Index: src/execution.cc |
diff --git a/src/execution.cc b/src/execution.cc |
index ea8cc3725d781ec30e672147d970402dfee3b472..561897567378e90e0d6011334aaf3ffbd65648cb 100644 |
--- a/src/execution.cc |
+++ b/src/execution.cc |
@@ -826,6 +826,11 @@ Object* Execution::DebugBreakHelper() { |
return isolate->heap()->undefined_value(); |
} |
+ StackLimitCheck check(isolate); |
+ if (check.HasOverflowed()) { |
+ return isolate->heap()->undefined_value(); |
+ } |
+ |
{ |
JavaScriptFrameIterator it(isolate); |
ASSERT(!it.done()); |
@@ -862,6 +867,11 @@ void Execution::ProcessDebugMessages(bool debug_command_only) { |
// Clear the debug command request flag. |
isolate->stack_guard()->Continue(DEBUGCOMMAND); |
+ StackLimitCheck check(isolate); |
+ if (check.HasOverflowed()) { |
+ return; |
+ } |
+ |
HandleScope scope(isolate); |
// Enter the debugger. Just continue if we fail to enter the debugger. |
EnterDebugger debugger; |