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

Unified Diff: src/debug/debug.cc

Issue 2668763003: [inspector] V8DebuggerAgent cleanup (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | src/inspector/v8-debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index b732303fc8572bec2abf1c89edc8c7924b77743c..32c797009d4153a721a0b5ac550bc4b2775033f7 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1764,6 +1764,7 @@ void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
if (!break_on_exception_) return;
}
+ bool empty_js_stack = false;
{
JavaScriptFrameIterator it(isolate_);
// Check whether the top frame is blackboxed or the break location is muted.
@@ -1771,12 +1772,13 @@ void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
IsExceptionBlackboxed(uncaught))) {
return;
}
+ empty_js_stack = it.done();
}
DebugScope debug_scope(this);
if (debug_scope.failed()) return;
- if (debug_delegate_) {
+ if (debug_delegate_ && !empty_js_stack) {
HandleScope scope(isolate_);
// Create the execution state.
@@ -1788,8 +1790,8 @@ void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
GetDebugEventContext(isolate_),
v8::Utils::ToLocal(Handle<JSObject>::cast(exec_state)),
v8::Utils::ToLocal(exception), promise->IsJSObject(), uncaught);
- if (!non_inspector_listener_exists()) return;
}
+ if (debug_delegate_ && !non_inspector_listener_exists()) return;
// Create the event data object.
Handle<Object> event_data;
« no previous file with comments | « no previous file | src/inspector/v8-debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698