diff options
Diffstat (limited to 'deps/v8/src/execution.cc')
-rw-r--r-- | deps/v8/src/execution.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/deps/v8/src/execution.cc b/deps/v8/src/execution.cc index 9080f5eaaa..0ad55bd558 100644 --- a/deps/v8/src/execution.cc +++ b/deps/v8/src/execution.cc @@ -156,7 +156,8 @@ Handle<Object> Execution::TryCall(Handle<JSFunction> func, ASSERT(catcher.HasCaught()); ASSERT(Top::has_pending_exception()); ASSERT(Top::external_caught_exception()); - Top::optional_reschedule_exception(true); + bool is_bottom_call = HandleScopeImplementer::instance()->CallDepthIsZero(); + Top::OptionalRescheduleException(is_bottom_call, true); result = v8::Utils::OpenHandle(*catcher.Exception()); } @@ -328,6 +329,19 @@ void StackGuard::Preempt() { } +bool StackGuard::IsTerminateExecution() { + ExecutionAccess access; + return thread_local_.interrupt_flags_ & TERMINATE; +} + + +void StackGuard::TerminateExecution() { + ExecutionAccess access; + thread_local_.interrupt_flags_ |= TERMINATE; + set_limits(kInterruptLimit, access); +} + + #ifdef ENABLE_DEBUGGER_SUPPORT bool StackGuard::IsDebugBreak() { ExecutionAccess access; @@ -638,6 +652,10 @@ Object* Execution::HandleStackGuardInterrupt() { } #endif if (StackGuard::IsPreempted()) RuntimePreempt(); + if (StackGuard::IsTerminateExecution()) { + StackGuard::Continue(TERMINATE); + return Top::TerminateExecution(); + } if (StackGuard::IsInterrupted()) { // interrupt StackGuard::Continue(INTERRUPT); |