summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_child_process_host_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/browser_child_process_host_impl.cc')
-rw-r--r--content/browser/browser_child_process_host_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 0c2b637..97058a6 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -261,6 +261,10 @@ void BrowserChildProcessHostImpl::OnChannelError() {
void BrowserChildProcessHostImpl::OnBadMessageReceived(
const IPC::Message& message) {
HistogramBadMessageTerminated(data_.process_type);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableKillAfterBadIPC)) {
+ return;
+ }
base::KillProcess(GetHandle(), RESULT_CODE_KILLED_BAD_MESSAGE, false);
}