diff options
Diffstat (limited to 'core/bindings.rs')
-rw-r--r-- | core/bindings.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 48450a619..7467fe0a8 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -26,9 +26,6 @@ lazy_static::lazy_static! { function: print.map_fn_to() }, v8::ExternalReference { - function: recv.map_fn_to() - }, - v8::ExternalReference { function: send.map_fn_to() }, v8::ExternalReference { @@ -122,7 +119,6 @@ pub fn initialize_context<'s>( // Bind functions to Deno.core.* set_func(scope, core_val, "print", print); - set_func(scope, core_val, "recv", recv); set_func(scope, core_val, "send", send); set_func( scope, @@ -321,27 +317,6 @@ fn print( } } -fn recv( - scope: &mut v8::HandleScope, - args: v8::FunctionCallbackArguments, - _rv: v8::ReturnValue, -) { - let state_rc = JsRuntime::state(scope); - let mut state = state_rc.borrow_mut(); - - let cb = match v8::Local::<v8::Function>::try_from(args.get(0)) { - Ok(cb) => cb, - Err(err) => return throw_type_error(scope, err.to_string()), - }; - - let slot = match &mut state.js_recv_cb { - slot @ None => slot, - _ => return throw_type_error(scope, "Deno.core.recv() already called"), - }; - - slot.replace(v8::Global::new(scope, cb)); -} - fn send<'s>( scope: &mut v8::HandleScope<'s>, args: v8::FunctionCallbackArguments, |