Skip to content

Commit

Permalink
crypto: account for disabled SharedArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Oct 4, 2023
1 parent 55ff640 commit 1feae12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internal/crypto/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ converters.object = (V, opts) => {
};

function isNonSharedArrayBuffer(V) {
return ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, V);
// SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
if (SharedArrayBuffer !== undefined)
return ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, V);
return false;
}

function isSharedArrayBuffer(V) {
Expand Down

0 comments on commit 1feae12

Please sign in to comment.