summaryrefslogtreecommitdiff
path: root/core/ops_builtin_v8.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-07-25 01:10:56 +0200
committerGitHub <noreply@github.com>2022-07-25 01:10:56 +0200
commit2e1d6d35081f17cec220a11b3578b135fb42df91 (patch)
tree06436be0c0a9b67c0347fdb372c14cd297304e0e /core/ops_builtin_v8.rs
parent7036600be3cebc3e87ab0aff75b6e3d0cd216be9 (diff)
refactor(core): remove unneeded ops for uncaughtException (#15296)
Diffstat (limited to 'core/ops_builtin_v8.rs')
-rw-r--r--core/ops_builtin_v8.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs
index a17e273f3..fbbcdd440 100644
--- a/core/ops_builtin_v8.rs
+++ b/core/ops_builtin_v8.rs
@@ -26,7 +26,6 @@ pub(crate) fn init_builtins_v8() -> Vec<OpDecl> {
op_set_macrotask_callback::decl(),
op_set_next_tick_callback::decl(),
op_set_promise_reject_callback::decl(),
- op_set_uncaught_exception_callback::decl(),
op_run_microtasks::decl(),
op_has_tick_scheduled::decl(),
op_set_has_tick_scheduled::decl(),
@@ -110,18 +109,6 @@ fn op_set_promise_reject_callback<'a>(
}
#[op(v8)]
-fn op_set_uncaught_exception_callback<'a>(
- scope: &mut v8::HandleScope<'a>,
- cb: serde_v8::Value,
-) -> Result<Option<serde_v8::Value<'a>>, Error> {
- let cb = to_v8_fn(scope, cb)?;
- let state_rc = JsRuntime::state(scope);
- let old = state_rc.borrow_mut().js_uncaught_exception_cb.replace(cb);
- let old = old.map(|v| v8::Local::new(scope, v));
- Ok(old.map(|v| from_v8(scope, v.into()).unwrap()))
-}
-
-#[op(v8)]
fn op_run_microtasks(scope: &mut v8::HandleScope) {
scope.perform_microtask_checkpoint();
}