Skip to content

Commit a39227d

Browse files
committed
crypto: account for disabled SharedArrayBuffer
1 parent 55ff640 commit a39227d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/internal/crypto/webidl.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ function isNonSharedArrayBuffer(V) {
184184
}
185185

186186
function isSharedArrayBuffer(V) {
187-
return ObjectPrototypeIsPrototypeOf(SharedArrayBuffer.prototype, V);
187+
// SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
188+
if (SharedArrayBuffer !== undefined)
189+
return ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, V);
190+
return false;
188191
}
189192

190193
converters.Uint8Array = (V, opts = kEmptyObject) => {

0 commit comments

Comments
 (0)