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

Unified Diff: base/process/launch_fuchsia.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 | « base/process/launch.h ('k') | base/process/launch_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch_fuchsia.cc
diff --git a/base/process/launch_fuchsia.cc b/base/process/launch_fuchsia.cc
index 5ceb9ab439492b08f71241eb4f4768b2097b00d8..e7e607207f6f062060041de72fe91f5b42324063 100644
--- a/base/process/launch_fuchsia.cc
+++ b/base/process/launch_fuchsia.cc
@@ -116,15 +116,12 @@ Process LaunchProcess(const std::vector<std::string>& argv,
else
to_clone |= LP_CLONE_ENVIRON;
- if (!options.fds_to_remap)
+ if (options.fds_to_remap.empty())
to_clone |= LP_CLONE_MXIO_STDIO;
launchpad_clone(lp, to_clone);
- if (options.fds_to_remap) {
- for (const auto& src_target : *options.fds_to_remap) {
- launchpad_clone_fd(lp, src_target.first, src_target.second);
- }
- }
+ for (const auto& src_target : options.fds_to_remap)
+ launchpad_clone_fd(lp, src_target.first, src_target.second);
mx_handle_t proc;
const char* errmsg;
« no previous file with comments | « base/process/launch.h ('k') | base/process/launch_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698