Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 7f96ddc4ad4dcff1014f5cd81ead1add60a746ab..bd371df1dde49edcd3c688e8e3c9fe3f8ade90d1 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -3072,8 +3072,17 @@ void Debug::HandleDebugBreak() { |
bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && |
!isolate_->stack_guard()->CheckDebugBreak(); |
+ bool is_debugger_statement = !isolate_->stack_guard()->CheckDebugCommand() && |
+ !isolate_->stack_guard()->CheckDebugBreak(); |
+ |
isolate_->stack_guard()->ClearDebugBreak(); |
+ if (is_debugger_statement) { |
+ // If we have been called via 'debugger' Javascript statement, |
+ // we might not be prepared for breakpoints. |
+ HandleScope handle_scope(isolate_); |
+ PrepareForBreakPoints(); |
+ } |
Yang
2015/03/26 15:10:48
Can we put all of this into Runtime_DebugBreak?
Dmitry Lomov (no reviews)
2015/03/26 15:51:17
Done.
|
ProcessDebugMessages(debug_command_only); |
} |