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

Unified Diff: net/test/spawned_test_server/local_test_server_posix.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Merge Created 3 years, 5 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
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.cc ('k') | net/test/spawned_test_server/local_test_server_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/local_test_server_posix.cc
diff --git a/net/test/spawned_test_server/local_test_server_posix.cc b/net/test/spawned_test_server/local_test_server_posix.cc
index e5db9c010ddd762a5217eb5cdce4877f30c4e017..ac631cc9c7594b127f365d2d7b78d63febbc4bcf 100644
--- a/net/test/spawned_test_server/local_test_server_posix.cc
+++ b/net/test/spawned_test_server/local_test_server_posix.cc
@@ -126,8 +126,6 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) {
// Save the read half. The write half is sent to the child.
child_fd_.reset(pipefd[0]);
base::ScopedFD write_closer(pipefd[1]);
- base::FileHandleMappingVector map_write_fd;
- map_write_fd.push_back(std::make_pair(pipefd[1], pipefd[1]));
python_command.AppendArg("--startup-pipe=" + base::IntToString(pipefd[1]));
@@ -140,8 +138,7 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) {
// Launch a new testserver process.
base::LaunchOptions options;
-
- options.fds_to_remap = &map_write_fd;
+ options.fds_to_remap.push_back(std::make_pair(pipefd[1], pipefd[1]));
process_ = base::LaunchProcess(python_command, options);
if (!process_.IsValid()) {
LOG(ERROR) << "Failed to launch " << python_command.GetCommandLineString();
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.cc ('k') | net/test/spawned_test_server/local_test_server_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698