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

Unified Diff: services/shell/runner/host/child_process_host.cc

Issue 2019973002: [mojo-edk] Bind a child token to child launches and port reservations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert stuff. Created 4 years, 7 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: services/shell/runner/host/child_process_host.cc
diff --git a/services/shell/runner/host/child_process_host.cc b/services/shell/runner/host/child_process_host.cc
index f9cda1f85fd5923ca88027d58d40ac0262399b4d..2baf94dc8293d5f0b2de8fc133a8a82170eb2319 100644
--- a/services/shell/runner/host/child_process_host.cc
+++ b/services/shell/runner/host/child_process_host.cc
@@ -50,6 +50,7 @@ ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner,
start_sandboxed_(start_sandboxed),
target_(target),
app_path_(app_path),
+ child_token_(mojo::edk::GenerateRandomToken()),
start_child_process_event_(false, false),
weak_factory_(this) {
}
@@ -97,7 +98,8 @@ mojom::ShellClientPtr ChildProcessHost::Start(
child_command_line.get(), &handle_passing_info_);
mojom::ShellClientPtr client =
- PassShellClientRequestOnCommandLine(child_command_line.get());
+ PassShellClientRequestOnCommandLine(child_command_line.get(),
+ child_token_);
launch_process_runner_->PostTaskAndReply(
FROM_HERE,
base::Bind(&ChildProcessHost::DoLaunch, base::Unretained(this),
@@ -201,7 +203,8 @@ void ChildProcessHost::DoLaunch(
mojo::edk::ChildProcessLaunched(
child_process_.Handle(),
mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle(
- mojo_ipc_channel_->PassServerHandle().release().handle)));
+ mojo_ipc_channel_->PassServerHandle().release().handle)),
+ child_token_);
}
}
start_child_process_event_.Signal();

Powered by Google App Engine
This is Rietveld 408576698