diff --git a/lib/internal/crypto/webidl.js b/lib/internal/crypto/webidl.js index 9f5340c223902c..61a4cfe4330703 100644 --- a/lib/internal/crypto/webidl.js +++ b/lib/internal/crypto/webidl.js @@ -184,7 +184,10 @@ function isNonSharedArrayBuffer(V) { } function isSharedArrayBuffer(V) { - return ObjectPrototypeIsPrototypeOf(SharedArrayBuffer.prototype, V); + // SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer. + if (SharedArrayBuffer !== undefined) + return ObjectPrototypeIsPrototypeOf(SharedArrayBuffer.prototype, V); + return false; } converters.Uint8Array = (V, opts = kEmptyObject) => {