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

Unified Diff: src/debug.cc

Issue 13720: Changed the debugger break handling to support situations where there are no ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 952)
+++ src/debug.cc (working copy)
@@ -849,7 +849,12 @@
void Debug::FloodHandlerWithOneShot() {
+ // Iterate through the JavaScript stack looking for handlers.
StackFrame::Id id = Top::break_frame_id();
+ if (id == StackFrame::NO_ID) {
+ // If there is no JavaScript stack don't do anything.
+ return;
+ }
for (JavaScriptFrameIterator it(id); !it.done(); it.Advance()) {
JavaScriptFrame* frame = it.frame();
if (frame->HasHandler()) {
@@ -886,6 +891,10 @@
// hitting a break point. In other situations (e.g. unhandled exception) the
// debug frame is not present.
StackFrame::Id id = Top::break_frame_id();
+ if (id == StackFrame::NO_ID) {
+ // If there is no JavaScript stack don't do anything.
+ return;
+ }
JavaScriptFrameIterator frames_it(id);
JavaScriptFrame* frame = frames_it.frame();

Powered by Google App Engine
This is Rietveld 408576698