Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: src/execution.cc

Issue 77035: Add ENABLE_DEBUGGER_SUPPORT macro.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/execution.h ('k') | src/factory.h » ('j') | src/serialize.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/execution.h ('k') | src/factory.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698