diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index 72ba3258933..793c19df1e9 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -203,7 +203,6 @@ module.exports = function() { // 25 Structured Data ArrayBufferPrototype, // 25.1 - SharedArrayBuffer.prototype, // 25.2 DataViewPrototype, // 25.3 // 26 Managing Memory @@ -309,7 +308,6 @@ module.exports = function() { // 25 Structured Data ArrayBuffer, // 25.1 - SharedArrayBuffer, // 25.2 DataView, // 25.3 Atomics, // 25.4 // eslint-disable-next-line node-core/prefer-primordials @@ -354,6 +352,11 @@ module.exports = function() { WebAssembly, ]; + if (typeof SharedArrayBuffer !== 'undefined') { // 25.2 + ArrayPrototypePush(intrinsicPrototypes, SharedArrayBuffer.prototype); + ArrayPrototypePush(intrinsics, SharedArrayBuffer); + } + if (typeof Intl !== 'undefined') { ArrayPrototypePush(intrinsicPrototypes, Intl.Collator.prototype,