summaryrefslogtreecommitdiff
path: root/ext/web/message_port.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web/message_port.rs')
-rw-r--r--ext/web/message_port.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/web/message_port.rs b/ext/web/message_port.rs
index 8734f9b65..7f2b18b3c 100644
--- a/ext/web/message_port.rs
+++ b/ext/web/message_port.rs
@@ -4,6 +4,8 @@ use std::rc::Rc;
use deno_core::error::type_error;
use deno_core::error::AnyError;
+use deno_core::op;
+
use deno_core::ZeroCopyBuf;
use deno_core::{CancelFuture, Resource};
use deno_core::{CancelHandle, OpState};
@@ -104,6 +106,7 @@ impl Resource for MessagePortResource {
}
}
+#[op]
pub fn op_message_port_create_entangled(
state: &mut OpState,
_: (),
@@ -185,6 +188,7 @@ pub struct JsMessageData {
transferables: Vec<JsTransferable>,
}
+#[op]
pub fn op_message_port_post_message(
state: &mut OpState,
rid: ResourceId,
@@ -203,6 +207,7 @@ pub fn op_message_port_post_message(
resource.port.send(state, data)
}
+#[op]
pub async fn op_message_port_recv_message(
state: Rc<RefCell<OpState>>,
rid: ResourceId,