Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(core): rename handleAsyncMsgFromRust() to opresolve() #11774

Merged
merged 1 commit into from Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/01_core.js
Expand Up @@ -88,7 +88,7 @@
opsCache = ObjectFreeze(ObjectFromEntries(opcall(0)));
}

function handleAsyncMsgFromRust() {
function opresolve() {
for (let i = 0; i < arguments.length; i += 2) {
const promiseId = arguments[i];
const res = arguments[i + 1];
Expand Down Expand Up @@ -179,7 +179,7 @@
resources,
registerErrorBuilder,
registerErrorClass,
handleAsyncMsgFromRust,
opresolve,
syncOpsCache,
BadResource,
Interrupted,
Expand Down
7 changes: 3 additions & 4 deletions core/runtime.rs
Expand Up @@ -461,13 +461,12 @@ impl JsRuntime {
Ok(())
}

/// Grabs a reference to core.js' handleAsyncMsgFromRust
/// Grabs a reference to core.js' opresolve
fn init_recv_cb(&mut self) {
let scope = &mut self.handle_scope();

// Get Deno.core.handleAsyncMsgFromRust
let code =
v8::String::new(scope, "Deno.core.handleAsyncMsgFromRust").unwrap();
// Get Deno.core.opresolve
let code = v8::String::new(scope, "Deno.core.opresolve").unwrap();
let script = v8::Script::compile(scope, code, None).unwrap();
let v8_value = script.run(scope).unwrap();

Expand Down