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

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
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f4b000d3d2c9c9519344b6fa2fd65ae89357bf37 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;
// Create a memory dump. This will contain enough stack frames to work out
// what the bad message was.
base::debug::DumpWithoutCrashing();
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698