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

Unified Diff: headless/lib/browser/headless_devtools_client_impl.cc

Issue 2514343002: Don't silently eat Inspector.TargetCrashed (Closed)
Patch Set: Added a comment Created 4 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 | « headless/app/headless_shell.cc ('k') | headless/lib/headless_devtools_client_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_devtools_client_impl.cc
diff --git a/headless/lib/browser/headless_devtools_client_impl.cc b/headless/lib/browser/headless_devtools_client_impl.cc
index 010d3d113da09e661e20e5a558a5b0d0e8064494..318ab8543cea28eb4f2a0c85010532305e53963e 100644
--- a/headless/lib/browser/headless_devtools_client_impl.cc
+++ b/headless/lib/browser/headless_devtools_client_impl.cc
@@ -133,15 +133,10 @@ bool HeadlessDevToolsClientImpl::DispatchEvent(
std::string method;
if (!message_dict.GetString("method", &method))
return false;
+ if (method == "Inspector.targetCrashed")
+ renderer_crashed_ = true;
EventHandlerMap::const_iterator it = event_handlers_.find(method);
if (it == event_handlers_.end()) {
- // Silently swallow errors related to the target crashing. This can be
- // observed via HeadlessWebContents::Observer::RenderProcessExited.
- if (method == "Inspector.targetCrashed") {
- renderer_crashed_ = true;
- return true;
- }
-
NOTREACHED() << "Unknown event: " << method;
return false;
}
« no previous file with comments | « headless/app/headless_shell.cc ('k') | headless/lib/headless_devtools_client_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698