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

Unified Diff: src/debug.cc

Issue 6234: Refactored the logic for entering the debugger into one abstraction EnterDebu... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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/debug.h ('k') | src/mirror-delay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 384)
+++ src/debug.cc (working copy)
@@ -631,8 +631,11 @@
return Heap::undefined_value();
}
- SaveBreakFrame save;
- EnterDebuggerContext enter;
+ // Enter the debugger.
+ EnterDebugger debugger;
+ if (debugger.FailedToEnter()) {
+ return Heap::undefined_value();
+ }
// Postpone interrupt during breakpoint processing.
PostponeInterruptsScope postpone;
@@ -1415,10 +1418,9 @@
if (!Debug::break_on_exception()) return;
}
- // Enter the debugger. Bail out if the debugger cannot be loaded.
- if (!Debug::Load()) return;
- SaveBreakFrame save;
- EnterDebuggerContext enter;
+ // Enter the debugger.
+ EnterDebugger debugger;
+ if (debugger.FailedToEnter()) return;
// Clear all current stepping setup.
Debug::ClearStepping();
@@ -1479,10 +1481,9 @@
if (compiling_natives()) return;
if (!EventActive(v8::BeforeCompile)) return;
- // Enter the debugger. Bail out if the debugger cannot be loaded.
- if (!Debug::Load()) return;
- SaveBreakFrame save;
- EnterDebuggerContext enter;
+ // Enter the debugger.
+ EnterDebugger debugger;
+ if (debugger.FailedToEnter()) return;
// Create the event data object.
bool caught_exception = false;
@@ -1509,10 +1510,9 @@
// No more to do if not debugging.
if (!debugger_active()) return;
- // Enter the debugger. Bail out if the debugger cannot be loaded.
- if (!Debug::Load()) return;
- SaveBreakFrame save;
- EnterDebuggerContext enter;
+ // Enter the debugger.
+ EnterDebugger debugger;
+ if (debugger.FailedToEnter()) return;
// If debugging there might be script break points registered for this
// script. Make sure that these break points are set.
@@ -1567,10 +1567,9 @@
if (compiling_natives()) return;
if (!Debugger::EventActive(v8::NewFunction)) return;
- // Enter the debugger. Bail out if the debugger cannot be loaded.
- if (!Debug::Load()) return;
- SaveBreakFrame save;
- EnterDebuggerContext enter;
+ // Enter the debugger.
+ EnterDebugger debugger;
+ if (debugger.FailedToEnter()) return;
// Create the event object.
bool caught_exception = false;
« no previous file with comments | « src/debug.h ('k') | src/mirror-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698