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

Unified Diff: content/public/browser/browser_message_filter.cc

Issue 18254010: IPC fuzzer child process component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 1 month 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/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_message_filter.cc
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc
index bbc6b13c03baa3b40dc9c5223be96d709458a077..cca9d309f01454b3c50a1ea1809aba2c58514621 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -6,11 +6,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/process/kill.h"
#include "base/process/process_handle.h"
#include "base/task_runner.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "ipc/ipc_sync_message.h"
@@ -177,8 +179,12 @@ bool BrowserMessageFilter::CheckCanDispatchOnUI(const IPC::Message& message,
}
void BrowserMessageFilter::BadMessageReceived() {
- base::KillProcess(PeerHandle(), content::RESULT_CODE_KILLED_BAD_MESSAGE,
- false);
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+
+ if (!command_line->HasSwitch(switches::kDisableKillAfterBadIPC)) {
+ base::KillProcess(PeerHandle(), content::RESULT_CODE_KILLED_BAD_MESSAGE,
+ false);
+ }
}
BrowserMessageFilter::~BrowserMessageFilter() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698