| Index: src/execution.cc
|
| ===================================================================
|
| --- src/execution.cc (revision 1738)
|
| +++ src/execution.cc (working copy)
|
| @@ -305,6 +305,7 @@
|
| }
|
|
|
|
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| bool StackGuard::IsDebugBreak() {
|
| ExecutionAccess access;
|
| return thread_local_.interrupt_flags_ & DEBUGBREAK;
|
| @@ -331,8 +332,8 @@
|
| set_limits(kInterruptLimit, access);
|
| }
|
| }
|
| +#endif
|
|
|
| -
|
| void StackGuard::Continue(InterruptFlag after_what) {
|
| ExecutionAccess access;
|
| thread_local_.interrupt_flags_ &= ~static_cast<int>(after_what);
|
| @@ -539,6 +540,7 @@
|
|
|
| ContextSwitcher::PreemptionReceived();
|
|
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| if (Debug::InDebugger()) {
|
| // If currently in the debugger don't do any actual preemption but record
|
| // that preemption occoured while in the debugger.
|
| @@ -548,11 +550,17 @@
|
| v8::Unlocker unlocker;
|
| Thread::YieldCPU();
|
| }
|
| +#else
|
| + // Perform preemption.
|
| + v8::Unlocker unlocker;
|
| + Thread::YieldCPU();
|
| +#endif
|
|
|
| return Heap::undefined_value();
|
| }
|
|
|
|
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| Object* Execution::DebugBreakHelper() {
|
| // Just continue if breaks are disabled.
|
| if (Debug::disable_break()) {
|
| @@ -598,12 +606,14 @@
|
| // Return to continue execution.
|
| return Heap::undefined_value();
|
| }
|
| +#endif
|
|
|
| -
|
| Object* Execution::HandleStackGuardInterrupt() {
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| if (StackGuard::IsDebugBreak() || StackGuard::IsDebugCommand()) {
|
| DebugBreakHelper();
|
| }
|
| +#endif
|
| if (StackGuard::IsPreempted()) RuntimePreempt();
|
| if (StackGuard::IsInterrupted()) {
|
| // interrupt
|
|
|