diff options
author | jamescook <jamescook@chromium.org> | 2015-03-20 11:01:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-20 18:02:04 +0000 |
commit | da2505817c8cac8331a0fcab1902e71f3c2b7daf (patch) | |
tree | 2f37dc19abca0f345ba4a6d92f852a7e90e9ef21 /extensions/browser/extension_host.cc | |
parent | e331ef6c7b1f7f335ceb33462bbf9450e4f5df20 (diff) | |
download | chromium_src-da2505817c8cac8331a0fcab1902e71f3c2b7daf.zip chromium_src-da2505817c8cac8331a0fcab1902e71f3c2b7daf.tar.gz chromium_src-da2505817c8cac8331a0fcab1902e71f3c2b7daf.tar.bz2 |
Add UMA histograms and logging for bad IPC message handling
Many different places in the Chrome codebase handle unexpected IPC data
by killing the renderer. This can result in hard-to-debug sad tab pages.
Some, but not all, of these locations log an error; others record UMA
user actions. This CL fixes most sites to both log and record metrics.
It also switches the metrics to be histograms instead of user actions
because we don't need the extra timestamp data from user actions and
most of these sorts of metrics live in histograms.
BUG=462687
TEST=unit_tests
Review URL: https://codereview.chromium.org/1009583004
Cr-Commit-Position: refs/heads/master@{#321598}
Diffstat (limited to 'extensions/browser/extension_host.cc')
-rw-r--r-- | extensions/browser/extension_host.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/extensions/browser/extension_host.cc b/extensions/browser/extension_host.cc index 8993655..0afeb43 100644 --- a/extensions/browser/extension_host.cc +++ b/extensions/browser/extension_host.cc @@ -19,6 +19,7 @@ #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" +#include "extensions/browser/bad_message.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_error.h" #include "extensions/browser/extension_host_delegate.h" @@ -365,7 +366,8 @@ void ExtensionHost::OnEventAck(int event_id) { DCHECK(render_process_host()); LOG(ERROR) << "Killing renderer for extension " << extension_id() << " for " << "sending an EventAck message with a bad event id."; - render_process_host()->ReceivedBadMessage(); + bad_message::ReceivedBadMessage(render_process_host(), + bad_message::EH_BAD_EVENT_ID); } } |