Index: content/browser/child_process_launcher.cc |
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc |
index 3700f47e04cbb73127724b397919d1998f57aba2..686a7206b9928f4c506501136de6b1e42bb22ce4 100644 |
--- a/content/browser/child_process_launcher.cc |
+++ b/content/browser/child_process_launcher.cc |
@@ -30,7 +30,6 @@ ChildProcessLauncher::ChildProcessLauncher( |
termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION), |
exit_code_(RESULT_CODE_NORMAL_EXIT), |
starting_(true), |
- pending_connection_(std::move(pending_connection)), |
process_error_callback_(process_error_callback), |
#if defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \ |
defined(MEMORY_SANITIZER) || defined(THREAD_SANITIZER) || \ |
@@ -44,9 +43,10 @@ ChildProcessLauncher::ChildProcessLauncher( |
CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_)); |
helper_ = new ChildProcessLauncherHelper( |
- child_process_id, client_thread_id_, |
- std::move(command_line), std::move(delegate), |
- weak_factory_.GetWeakPtr(), terminate_on_shutdown); |
+ child_process_id, client_thread_id_, std::move(command_line), |
+ std::move(delegate), std::move(pending_connection), |
+ process_error_callback_, weak_factory_.GetWeakPtr(), |
+ terminate_on_shutdown); |
helper_->StartLaunchOnClientThread(); |
} |
@@ -70,24 +70,15 @@ void ChildProcessLauncher::SetProcessBackgrounded(bool background) { |
background)); |
} |
-void ChildProcessLauncher::Notify( |
- ChildProcessLauncherHelper::Process process, |
- mojo::edk::ScopedPlatformHandle server_handle, |
- int error_code) { |
+void ChildProcessLauncher::Notify(ChildProcessLauncherHelper::Process process, |
+ int error_code) { |
DCHECK(CalledOnValidThread()); |
starting_ = false; |
process_ = std::move(process); |
// Take ownership of the pending connection here so it's destroyed when |
// we go out of scope regardless of the outcome below. |
- std::unique_ptr<mojo::edk::PendingProcessConnection> pending_connection = |
- std::move(pending_connection_); |
if (process_.process.IsValid()) { |
- // Set up Mojo IPC to the new process. |
- DCHECK(pending_connection); |
- pending_connection->Connect(process_.process.Handle(), |
- std::move(server_handle), |
- process_error_callback_); |
client_->OnProcessLaunched(); |
} else { |
termination_status_ = base::TERMINATION_STATUS_LAUNCH_FAILED; |