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

Unified Diff: src/d8.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 | « no previous file | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 69072a22e4fcde79672050c0b99c9b05f9749866..62e3810855191512f16ce99fc5b57b55fb6787ce 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1807,11 +1807,9 @@ class InspectorFrontend final : public v8_inspector::V8Inspector::Channel {
if (callback->IsFunction()) {
v8::TryCatch try_catch(isolate_);
Local<Value> args[] = {message};
- if (Local<Function>::Cast(callback)
- ->Call(context, Undefined(isolate_), 1, args)
- .IsEmpty()) {
- try_catch.ReThrow();
- }
+ MaybeLocal<Value> result = Local<Function>::Cast(callback)->Call(
+ context, Undefined(isolate_), 1, args);
+ CHECK(!result.IsEmpty()); // Listeners may not throw.
}
}
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698