Skip to content

Commit 358af09

Browse files
committed
Implement Isolate execution termination methods directly
1 parent 8802459 commit 358af09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/isolate.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -962,19 +962,21 @@ impl Isolate {
962962
/// See [`IsolateHandle::terminate_execution`]
963963
#[inline(always)]
964964
pub fn terminate_execution(&self) -> bool {
965-
self.thread_safe_handle().terminate_execution()
965+
unsafe { v8__Isolate__TerminateExecution(self.as_real_ptr()) };
966+
true
966967
}
967968

968969
/// See [`IsolateHandle::cancel_terminate_execution`]
969970
#[inline(always)]
970971
pub fn cancel_terminate_execution(&self) -> bool {
971-
self.thread_safe_handle().cancel_terminate_execution()
972+
unsafe { v8__Isolate__CancelTerminateExecution(self.as_real_ptr()) };
973+
true
972974
}
973975

974976
/// See [`IsolateHandle::is_execution_terminating`]
975977
#[inline(always)]
976978
pub fn is_execution_terminating(&self) -> bool {
977-
self.thread_safe_handle().is_execution_terminating()
979+
unsafe { v8__Isolate__IsExecutionTerminating(self.as_real_ptr()) }
978980
}
979981

980982
pub(crate) fn create_annex(

0 commit comments

Comments
 (0)