summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/unit/ops_test.ts2
-rw-r--r--cli/tools/test/fmt.rs1
-rw-r--r--ext/websocket/lib.rs16
-rw-r--r--runtime/js/99_main.js3
4 files changed, 1 insertions, 21 deletions
diff --git a/cli/tests/unit/ops_test.ts b/cli/tests/unit/ops_test.ts
index 71b66f312..e91c37e67 100644
--- a/cli/tests/unit/ops_test.ts
+++ b/cli/tests/unit/ops_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-const EXPECTED_OP_COUNT = 51;
+const EXPECTED_OP_COUNT = 50;
Deno.test(function checkExposedOps() {
// @ts-ignore TS doesn't allow to index with symbol
diff --git a/cli/tools/test/fmt.rs b/cli/tools/test/fmt.rs
index ac5cb4877..468b9d8f0 100644
--- a/cli/tools/test/fmt.rs
+++ b/cli/tools/test/fmt.rs
@@ -292,6 +292,5 @@ pub const OP_DETAILS: phf::Map<&'static str, [&'static str; 2]> = phf_map! {
"op_ws_send_binary" => ["send a message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
"op_ws_send_binary_ab" => ["send a message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
"op_ws_send_ping" => ["send a message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
- "op_ws_send_pong" => ["send a message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
"op_spawn_wait" => ["wait for a subprocess to exit", "awaiting the result of a `Deno.Process#status` call"],
};
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index 9b02d0759..e6f382c34 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -660,21 +660,6 @@ pub fn op_ws_get_buffered_amount(
}
#[op2(async)]
-pub async fn op_ws_send_pong(
- state: Rc<RefCell<OpState>>,
- #[smi] rid: ResourceId,
-) -> Result<(), AnyError> {
- let resource = state
- .borrow_mut()
- .resource_table
- .get::<ServerWebSocket>(rid)?;
- let lock = resource.reserve_lock();
- resource
- .write_frame(lock, Frame::pong(EMPTY_PAYLOAD.into()))
- .await
-}
-
-#[op2(async)]
pub async fn op_ws_send_ping(
state: Rc<RefCell<OpState>>,
#[smi] rid: ResourceId,
@@ -839,7 +824,6 @@ deno_core::extension!(deno_websocket,
op_ws_send_binary_async,
op_ws_send_text_async,
op_ws_send_ping,
- op_ws_send_pong,
op_ws_get_buffered_amount,
],
esm = [ "01_websocket.js", "02_websocketstream.js" ],
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 45349c038..c1ded6b24 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -614,9 +614,6 @@ const NOT_IMPORTED_OPS = [
"op_format_file_name",
"op_apply_source_map",
"op_apply_source_map_filename",
-
- // TODO(bartlomieju): this might be dead code.
- "op_ws_send_pong",
];
function removeImportedOps() {