summaryrefslogtreecommitdiff
path: root/ext/node/lib.rs
diff options
context:
space:
mode:
authorsnek <snek@deno.com>2024-08-28 19:25:38 -0700
committerGitHub <noreply@github.com>2024-08-29 02:25:38 +0000
commitf7556d8962b2106e82c9f0eb90f406eec0b60dd0 (patch)
treeed8cc065b713ed17750be1170d51725801565bd7 /ext/node/lib.rs
parent4f97261a012edda267ff6b74c5b0b6d08a1c12b8 (diff)
fix: reland async context (#25140)
This reverts commit 71ca61e189cca9215982ce4598b7a4da8430c584. Now uses a shared implementation from deno_core.
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r--ext/node/lib.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs
index 3ec2d26bf..17fd7ab5a 100644
--- a/ext/node/lib.rs
+++ b/ext/node/lib.rs
@@ -148,15 +148,6 @@ fn op_node_build_os() -> String {
env!("TARGET").split('-').nth(2).unwrap().to_string()
}
-#[op2(fast)]
-fn op_node_is_promise_rejected(value: v8::Local<v8::Value>) -> bool {
- let Ok(promise) = v8::Local::<v8::Promise>::try_from(value) else {
- return false;
- };
-
- promise.state() == v8::PromiseState::Rejected
-}
-
#[op2]
#[string]
fn op_npm_process_state(state: &mut OpState) -> Result<String, AnyError> {
@@ -347,7 +338,6 @@ deno_core::extension!(deno_node,
ops::os::op_cpus<P>,
ops::os::op_homedir<P>,
op_node_build_os,
- op_node_is_promise_rejected,
op_npm_process_state,
ops::require::op_require_init_paths,
ops::require::op_require_node_module_paths<P>,