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

Unified Diff: src/debug/debug.cc

Issue 2460833002: [debugger] Ensure debug listeners do not throw (Closed)
Patch Set: Use CHECK to fail in release mode as well Created 4 years, 2 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 | « src/d8.cc ('k') | test/mjsunit/mjsunit.status » ('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 711f54d9ff2c043f0ea3f55c20da6485fc9caa14..b3d8347cfd32171d95b40b55b3703532bfa46d37 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1850,7 +1850,7 @@ void Debug::CallEventCallback(v8::DebugEvent event,
event_listener_data_,
client_data);
callback(event_details);
- DCHECK(!isolate_->has_scheduled_exception());
+ CHECK(!isolate_->has_scheduled_exception());
} else {
// Invoke the JavaScript debug event listener.
DCHECK(event_listener_->IsJSFunction());
@@ -1859,8 +1859,10 @@ void Debug::CallEventCallback(v8::DebugEvent event,
event_data,
event_listener_data_ };
Handle<JSReceiver> global = isolate_->global_proxy();
- Execution::TryCall(isolate_, Handle<JSFunction>::cast(event_listener_),
- global, arraysize(argv), argv);
+ MaybeHandle<Object> result =
+ Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_),
+ global, arraysize(argv), argv);
+ CHECK(!result.is_null()); // Listeners may not throw.
}
in_debug_event_listener_ = previous;
}
« no previous file with comments | « src/d8.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698