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 08486fc7fa4c51c6284a25a35ae38b7d80f654c8..684e0dbc6460556bbf79f4998266ebf6eaf4ac3e 100644 |
--- a/content/browser/browser_child_process_host_impl.cc |
+++ b/content/browser/browser_child_process_host_impl.cc |
@@ -7,6 +7,7 @@ |
#include "base/base_switches.h" |
#include "base/bind.h" |
#include "base/command_line.h" |
+#include "base/debug/dump_without_crashing.h" |
#include "base/files/file_path.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
@@ -254,6 +255,11 @@ void BrowserChildProcessHostImpl::OnBadMessageReceived( |
} |
LOG(ERROR) << "Terminating child process for bad IPC message of type " |
<< message.type(); |
+ |
+ // Create a memory dump. This will contain enough stack frames to work out |
+ // what the bad message was. |
+ base::debug::DumpWithoutCrashing(); |
+ |
child_process_->GetProcess().Terminate(RESULT_CODE_KILLED_BAD_MESSAGE, false); |
} |