summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/runtime.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index 5b3b0ce50..42496b271 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -1167,11 +1167,11 @@ pub(crate) fn exception_to_err_result<'s, T>(
// If termination is the result of a `op_dispatch_exception` call, we want
// to use the exception that was passed to it rather than the exception that
// was passed to this function.
- let mut state = state_rc.borrow_mut();
+ let state = state_rc.borrow();
exception = state
.dispatched_exceptions
- .pop_back()
- .map(|exception| v8::Local::new(scope, exception))
+ .back()
+ .map(|exception| v8::Local::new(scope, exception.clone()))
.unwrap_or_else(|| {
// Maybe make a new exception object.
if was_terminating_execution && exception.is_null_or_undefined() {