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

Unified Diff: content/browser/child_process_launcher.cc

Issue 2054303002: Kill child processes on bad Mojo messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bad-message
Patch Set: . Created 4 years, 6 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/child_process_launcher.cc
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index ffd9c695ec677f782df3730b9873b1e55482624d..3e7015c8b6759269ba67873b8228dad52b02591b 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -396,12 +396,14 @@ ChildProcessLauncher::ChildProcessLauncher(
int child_process_id,
Client* client,
const std::string& mojo_child_token,
+ const mojo::edk::ProcessErrorCallback& process_error_callback,
bool terminate_on_shutdown)
: client_(client),
termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION),
exit_code_(RESULT_CODE_NORMAL_EXIT),
zygote_(nullptr),
starting_(true),
+ process_error_callback_(process_error_callback),
#if defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \
defined(MEMORY_SANITIZER) || defined(THREAD_SANITIZER) || \
defined(UNDEFINED_SANITIZER)
@@ -560,7 +562,8 @@ void ChildProcessLauncher::Notify(ZygoteHandle zygote,
// Set up Mojo IPC to the new process.
mojo::edk::ChildProcessLaunched(process_.Handle(),
std::move(mojo_host_platform_handle_),
- mojo_child_token_);
+ mojo_child_token_,
+ process_error_callback_);
}
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698