Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index f341fc6f1f1657f9eec848d011958f4224c8559a..c48e514ab8a0677b171379a79491e2f35e84c8de 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -1821,6 +1821,13 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) { |
bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) { |
HandleScope scope(isolate_); |
+ // If there are no break points this cannot be break at return, as |
+ // the debugger statement and stack guard bebug break cannot be at |
+ // return. |
+ if (!has_break_points_) { |
+ return false; |
+ } |
+ |
// Get the executing function in which the debug break occurred. |
Handle<SharedFunctionInfo> shared = |
Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared()); |