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

Unified Diff: src/execution.cc

Issue 9965101: Don't crash on stack overflow entering the debugger. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 8 years, 9 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.cc ('k') | test/mjsunit/regress/regress-119429.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/debug.cc ('k') | test/mjsunit/regress/regress-119429.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698