diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-09-06 12:18:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 13:18:23 +0200 |
commit | 118dd47ad0ced501b1ad8d9e1cc2a2f443f101e6 (patch) | |
tree | 15e7a58a63f442f58ded6d3b88d5baac0eabeb9b /core | |
parent | d20e80fa501ca7530e23e7251749da2f2277e250 (diff) |
fix(watch): ignore unload errors on drop (#15782)
Diffstat (limited to 'core')
-rw-r--r-- | core/runtime.rs | 6 |
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() { |