diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-12-28 16:36:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 16:36:44 +0100 |
commit | c98c487fdad70f31153b44ce214824a4c7b58fe6 (patch) | |
tree | 51d5af31d454b7c27052e06f5c302038ae03132c /core/runtime.rs | |
parent | 9419c06ab5e9f7fb258e7a48093f17f6d2511ea6 (diff) |
upgrade: rusty_v8 0.15.0, v8 8.8.294 (#8898)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index 24bdf4dc2..d1fb41dd0 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -604,18 +604,13 @@ pub(crate) fn exception_to_err_result<'s, T>( exception: v8::Local<v8::Value>, in_promise: bool, ) -> Result<T, AnyError> { - // TODO(piscisaureus): in rusty_v8, `is_execution_terminating()` should - // also be implemented on `struct Isolate`. - let is_terminating_exception = - scope.thread_safe_handle().is_execution_terminating(); + let is_terminating_exception = scope.is_execution_terminating(); let mut exception = exception; if is_terminating_exception { // TerminateExecution was called. Cancel exception termination so that the // exception can be created.. - // TODO(piscisaureus): in rusty_v8, `cancel_terminate_execution()` should - // also be implemented on `struct Isolate`. - scope.thread_safe_handle().cancel_terminate_execution(); + scope.cancel_terminate_execution(); // Maybe make a new exception object. if exception.is_null_or_undefined() { @@ -638,9 +633,7 @@ pub(crate) fn exception_to_err_result<'s, T>( if is_terminating_exception { // Re-enable exception termination. - // TODO(piscisaureus): in rusty_v8, `terminate_execution()` should also - // be implemented on `struct Isolate`. - scope.thread_safe_handle().terminate_execution(); + scope.terminate_execution(); } Err(js_error) @@ -1785,12 +1778,7 @@ pub mod tests { // Cancel the execution-terminating exception in order to allow script // execution again. - // TODO(piscisaureus): in rusty_v8, `cancel_terminate_execution()` should - // also be implemented on `struct Isolate`. - let ok = isolate - .v8_isolate() - .thread_safe_handle() - .cancel_terminate_execution(); + let ok = isolate.v8_isolate().cancel_terminate_execution(); assert!(ok); // Verify that the isolate usable again. |