lib: check SharedArrayBuffer availability in freeze_intrinsics.js
PR-URL: https://github.com/nodejs/node/pull/49482 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
d8eb8d05f9
commit
cfe4166f0f
@ -203,7 +203,6 @@ module.exports = function() {
|
|||||||
|
|
||||||
// 25 Structured Data
|
// 25 Structured Data
|
||||||
ArrayBufferPrototype, // 25.1
|
ArrayBufferPrototype, // 25.1
|
||||||
SharedArrayBuffer.prototype, // 25.2
|
|
||||||
DataViewPrototype, // 25.3
|
DataViewPrototype, // 25.3
|
||||||
|
|
||||||
// 26 Managing Memory
|
// 26 Managing Memory
|
||||||
@ -309,7 +308,6 @@ module.exports = function() {
|
|||||||
|
|
||||||
// 25 Structured Data
|
// 25 Structured Data
|
||||||
ArrayBuffer, // 25.1
|
ArrayBuffer, // 25.1
|
||||||
SharedArrayBuffer, // 25.2
|
|
||||||
DataView, // 25.3
|
DataView, // 25.3
|
||||||
Atomics, // 25.4
|
Atomics, // 25.4
|
||||||
// eslint-disable-next-line node-core/prefer-primordials
|
// eslint-disable-next-line node-core/prefer-primordials
|
||||||
@ -354,6 +352,11 @@ module.exports = function() {
|
|||||||
WebAssembly,
|
WebAssembly,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (typeof SharedArrayBuffer !== 'undefined') { // 25.2
|
||||||
|
ArrayPrototypePush(intrinsicPrototypes, SharedArrayBuffer.prototype);
|
||||||
|
ArrayPrototypePush(intrinsics, SharedArrayBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof Intl !== 'undefined') {
|
if (typeof Intl !== 'undefined') {
|
||||||
ArrayPrototypePush(intrinsicPrototypes,
|
ArrayPrototypePush(intrinsicPrototypes,
|
||||||
Intl.Collator.prototype,
|
Intl.Collator.prototype,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user