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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 2624613003: content: Change how a bad message from a child is logged. (Closed)
Patch Set: . Created 3 years, 11 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
Index: content/browser/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 185c8e7c33ac7090b8f95b08c03d66249d4367ae..f78785eee4bc47a53c2ce0ba68162ff8c244d4e4 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -373,18 +373,19 @@ void BrowserChildProcessHostImpl::OnChannelError() {
void BrowserChildProcessHostImpl::OnBadMessageReceived(
const IPC::Message& message) {
- TerminateOnBadMessageReceived(message.type());
+ std::string log_message =
+ base::StringPrintf("Bad message received of type: %u", message.type());
+ TerminateOnBadMessageReceived(log_message);
}
-void BrowserChildProcessHostImpl::TerminateOnBadMessageReceived(uint32_t type) {
+void BrowserChildProcessHostImpl::TerminateOnBadMessageReceived(
+ const std::string& error) {
HistogramBadMessageTerminated(data_.process_type);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableKillAfterBadIPC)) {
return;
}
- LOG(ERROR) << "Terminating child process for bad IPC message of type "
- << type;
-
+ LOG(ERROR) << "Terminating child process for bad IPC message:" << error;
Charlie Reis 2017/01/10 23:06:43 nit: Space after colon.
sadrul 2017/01/11 02:29:13 Done.
// Create a memory dump. This will contain enough stack frames to work out
// what the bad message was.
base::debug::DumpWithoutCrashing();

Powered by Google App Engine
This is Rietveld 408576698