diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-23 17:50:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 11:50:45 -0400 |
commit | dd156e886b0d0f7d67538539bf7f3624b817d80a (patch) | |
tree | 01022d4993b8590fc7ab78ca9a2e6efe35974fd3 /core/bindings.rs | |
parent | 8074d8bcf3cdcc7e9a08df147e0082798a7c2760 (diff) |
refactor(core): rename send() to opcall() (#10307)
I think it's a better fit since recv() was killed and opcall <> syscall (send/recv
was too reminiscent of request/response and custom payloads)
Diffstat (limited to 'core/bindings.rs')
-rw-r--r-- | core/bindings.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 7467fe0a8..4574e2d4e 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -26,7 +26,7 @@ lazy_static::lazy_static! { function: print.map_fn_to() }, v8::ExternalReference { - function: send.map_fn_to() + function: opcall.map_fn_to() }, v8::ExternalReference { function: set_macrotask_callback.map_fn_to() @@ -119,7 +119,7 @@ pub fn initialize_context<'s>( // Bind functions to Deno.core.* set_func(scope, core_val, "print", print); - set_func(scope, core_val, "send", send); + set_func(scope, core_val, "opcall", opcall); set_func( scope, core_val, @@ -317,7 +317,7 @@ fn print( } } -fn send<'s>( +fn opcall<'s>( scope: &mut v8::HandleScope<'s>, args: v8::FunctionCallbackArguments, mut rv: v8::ReturnValue, @@ -336,7 +336,7 @@ fn send<'s>( } }; - // send(0) returns obj of all ops, handle as special case + // opcall(0) returns obj of all ops, handle as special case if op_id == 0 { // TODO: Serialize as HashMap when serde_v8 supports maps ... let ops = OpTable::op_entries(state.op_state.clone()); |