summaryrefslogtreecommitdiff
path: root/core/error.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-10-21 08:24:22 +0530
committerGitHub <noreply@github.com>2022-10-21 08:24:22 +0530
commitc007657cfda4e07ee3070919c0b629f874ba9106 (patch)
treed9cb64b8b2f22f9d5ea1133b40830b0abe32c10b /core/error.rs
parent4b6168d5e3a990e7982bcb1a8fb525f1141d8839 (diff)
Revert realms from deno_core (#16366)
This revert has been discussed at length out-of-band (including with @andreubotella). The realms work in impeding ongoing event loop and performance work. We very much want to land realms but it needs to wait until these lower-level refactors are complete. We hope to bring realms back in a couple weeks.
Diffstat (limited to 'core/error.rs')
-rw-r--r--core/error.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/error.rs b/core/error.rs
index 626f9b6f2..7df5c1efa 100644
--- a/core/error.rs
+++ b/core/error.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use crate::runtime::GetErrorClassFn;
-use crate::runtime::JsRealm;
use crate::runtime::JsRuntime;
use crate::source_map::apply_source_map;
use crate::source_map::get_source_line;
@@ -98,7 +97,7 @@ pub fn to_v8_error<'a>(
get_class: GetErrorClassFn,
error: &Error,
) -> v8::Local<'a, v8::Value> {
- let cb = JsRealm::state_from_scope(scope)
+ let cb = JsRuntime::state(scope)
.borrow()
.js_build_custom_error_cb
.clone()
@@ -218,10 +217,10 @@ impl JsError {
let msg = v8::Exception::create_message(scope, exception);
let mut exception_message = None;
- let realm_state_rc = JsRealm::state_from_scope(scope);
+ let state_rc = JsRuntime::state(scope);
let js_format_exception_cb =
- realm_state_rc.borrow().js_format_exception_cb.clone();
+ state_rc.borrow().js_format_exception_cb.clone();
if let Some(format_exception_cb) = js_format_exception_cb {
let format_exception_cb = format_exception_cb.open(scope);
let this = v8::undefined(scope).into();
@@ -286,7 +285,6 @@ impl JsError {
let mut source_line = None;
let mut source_line_frame_index = None;
{
- let state_rc = JsRuntime::state(scope);
let state = &mut *state_rc.borrow_mut();
// When the stack frame array is empty, but the source location given by