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

Unified Diff: src/debug.cc

Issue 751833003: Version 3.30.33.4 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@3.30
Patch Set: Created 6 years, 1 month 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.h ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 841b6cfa8ea69a832fec143bf5714ab31fcc3dbd..6ee52fabe480de167a82d486f9ca90aecac4d948 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -40,6 +40,7 @@ Debug::Debug(Isolate* isolate)
live_edit_enabled_(true), // TODO(yangguo): set to false by default.
has_break_points_(false),
break_disabled_(false),
+ in_debug_event_listener_(false),
break_on_exception_(false),
break_on_uncaught_exception_(false),
script_cache_(NULL),
@@ -864,7 +865,7 @@ void Debug::Break(Arguments args, JavaScriptFrame* frame) {
LiveEdit::InitializeThreadLocal(this);
// Just continue if breaks are disabled or debugger cannot be loaded.
- if (break_disabled_) return;
+ if (break_disabled()) return;
// Enter the debugger.
DebugScope debug_scope(this);
@@ -2781,7 +2782,8 @@ void Debug::CallEventCallback(v8::DebugEvent event,
Handle<Object> exec_state,
Handle<Object> event_data,
v8::Debug::ClientData* client_data) {
- DisableBreak no_break(this, true);
+ bool previous = in_debug_event_listener_;
+ in_debug_event_listener_ = true;
if (event_listener_->IsForeign()) {
// Invoke the C debug event listener.
v8::Debug::EventCallback callback =
@@ -2805,6 +2807,7 @@ void Debug::CallEventCallback(v8::DebugEvent event,
Execution::TryCall(Handle<JSFunction>::cast(event_listener_),
global, arraysize(argv), argv);
}
+ in_debug_event_listener_ = previous;
}
@@ -3058,7 +3061,7 @@ void Debug::HandleDebugBreak() {
// Ignore debug break during bootstrapping.
if (isolate_->bootstrapper()->IsActive()) return;
// Just continue if breaks are disabled.
- if (break_disabled_) return;
+ if (break_disabled()) return;
// Ignore debug break if debugger is not active.
if (!is_active()) return;
« no previous file with comments | « src/debug.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698