mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
crypto: account for disabled SharedArrayBuffer
PR-URL: https://github.com/nodejs/node/pull/50034 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
f73650ea52
commit
136a96722a
1 file changed
+4
-1
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user