Skip to content

Commit

Permalink
crypto: account for disabled SharedArrayBuffer
Browse files Browse the repository at this point in the history
PR-URL: #50034
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
codebytere authored Oct 6, 2023
1 parent f73650e commit 136a967
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 @@ -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) => {
Expand Down

0 comments on commit 136a967

Please sign in to comment.