summaryrefslogtreecommitdiff
path: root/ext/websocket/01_websocket.js
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-03-30 21:22:12 +0530
committerGitHub <noreply@github.com>2023-03-30 17:52:12 +0200
commitcc7f5c10156333acae8cf9d004bb859ba5c58115 (patch)
tree21525b97b6bbed6bcbbdf82d733bcd17ad2d7e33 /ext/websocket/01_websocket.js
parent3abc53f8119409916776a5ff277a745022b60680 (diff)
perf(ext/websocket): special op for sending text data frames (#18507)
Similar to #18506 but for Text frames.
Diffstat (limited to 'ext/websocket/01_websocket.js')
-rw-r--r--ext/websocket/01_websocket.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js
index 399b46c52..d483608d8 100644
--- a/ext/websocket/01_websocket.js
+++ b/ext/websocket/01_websocket.js
@@ -325,10 +325,7 @@ class WebSocket extends EventTarget {
const d = core.encode(string);
this[_bufferedAmount] += d.byteLength;
PromisePrototypeThen(
- core.opAsync("op_ws_send", this[_rid], {
- kind: "text",
- value: string,
- }),
+ core.opAsync("op_ws_send_text", this[_rid], string),
() => {
this[_bufferedAmount] -= d.byteLength;
},