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; |