summaryrefslogtreecommitdiff
path: root/ext/websocket/01_websocket.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/websocket/01_websocket.js')
-rw-r--r--ext/websocket/01_websocket.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js
index f7dd516ff..c4c686b9c 100644
--- a/ext/websocket/01_websocket.js
+++ b/ext/websocket/01_websocket.js
@@ -33,7 +33,7 @@ const {
ObjectDefineProperties,
ObjectPrototypeIsPrototypeOf,
PromisePrototypeThen,
- RegExpPrototypeTest,
+ RegExpPrototypeExec,
SafeSet,
SetPrototypeGetSize,
// TODO(lucacasonato): add SharedArrayBuffer to primordials
@@ -256,7 +256,8 @@ class WebSocket extends EventTarget {
if (
ArrayPrototypeSome(
protocols,
- (protocol) => !RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, protocol),
+ (protocol) =>
+ RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, protocol) === null,
)
) {
throw new DOMException(