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/websocket | |
parent | 136dce67cec749dce5989ea29e88359ef79a0045 (diff) |
fix(core): Use safe primordials wrappers (#18687)
Diffstat (limited to 'ext/websocket')
-rw-r--r-- | ext/websocket/01_websocket.js | 4 | ||||
-rw-r--r-- | ext/websocket/02_websocketstream.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index a40263249..2c6bf46b2 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -33,7 +33,7 @@ const { ObjectPrototypeIsPrototypeOf, PromisePrototypeThen, RegExpPrototypeTest, - Set, + SafeSet, SetPrototypeGetSize, // TODO(lucacasonato): add SharedArrayBuffer to primordials // SharedArrayBufferPrototype @@ -223,7 +223,7 @@ class WebSocket extends EventTarget { if ( protocols.length !== SetPrototypeGetSize( - new Set( + new SafeSet( ArrayPrototypeMap(protocols, (p) => StringPrototypeToLowerCase(p)), ), ) diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index dd8e0d362..0ee7a70aa 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -21,7 +21,7 @@ const { ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, PromisePrototypeThen, - Set, + SafeSet, SetPrototypeGetSize, StringPrototypeEndsWith, StringPrototypeToLowerCase, @@ -118,7 +118,7 @@ class WebSocketStream { if ( options.protocols.length !== SetPrototypeGetSize( - new Set( + new SafeSet( ArrayPrototypeMap( options.protocols, (p) => StringPrototypeToLowerCase(p), |