Skip to content

Commit f0299f2

Browse files
committed
Implement Isolate execution termination methods directly
1 parent 98f2767 commit f0299f2

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
@@ -950,19 +950,21 @@ impl Isolate {
950950
/// See [`IsolateHandle::terminate_execution`]
951951
#[inline(always)]
952952
pub fn terminate_execution(&self) -> bool {
953-
self.thread_safe_handle().terminate_execution()
953+
unsafe { v8__Isolate__TerminateExecution(self.as_real_ptr()) };
954+
true
954955
}
955956

956957
/// See [`IsolateHandle::cancel_terminate_execution`]
957958
#[inline(always)]
958959
pub fn cancel_terminate_execution(&self) -> bool {
959-
self.thread_safe_handle().cancel_terminate_execution()
960+
unsafe { v8__Isolate__CancelTerminateExecution(self.as_real_ptr()) };
961+
true
960962
}
961963

962964
/// See [`IsolateHandle::is_execution_terminating`]
963965
#[inline(always)]
964966
pub fn is_execution_terminating(&self) -> bool {
965-
self.thread_safe_handle().is_execution_terminating()
967+
unsafe { v8__Isolate__IsExecutionTerminating(self.as_real_ptr()) }
966968
}
967969

968970
pub(crate) fn create_annex(

0 commit comments

Comments
 (0)