diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-04-15 05:23:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 22:23:28 +0200 |
commit | f086ec57b453fc0af763564eb80fea4b5b7f7296 (patch) | |
tree | 8c7800d918751893e4011eb86f23e8f687d4139b /ext/crypto/00_crypto.js | |
parent | 136dce67cec749dce5989ea29e88359ef79a0045 (diff) |
fix(core): Use safe primordials wrappers (#18687)
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r-- | ext/crypto/00_crypto.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index c4905a135..4d54b52a9 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -33,6 +33,7 @@ const { StringPrototypeCharCodeAt, StringFromCharCode, SafeArrayIterator, + SafeWeakMap, Symbol, SymbolFor, SyntaxError, @@ -43,7 +44,6 @@ const { TypedArrayPrototypeGetSymbolToStringTag, TypeError, Uint8Array, - WeakMap, WeakMapPrototypeGet, WeakMapPrototypeSet, } = primordials; @@ -391,7 +391,7 @@ function usageIntersection(a, b) { // TODO(lucacasonato): this should be moved to rust /** @type {WeakMap<object, object>} */ -const KEY_STORE = new WeakMap(); +const KEY_STORE = new SafeWeakMap(); function getKeyLength(algorithm) { switch (algorithm.name) { |