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

Unified Diff: base/process/launch_fuchsia.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix Created 3 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: base/process/launch_fuchsia.cc
diff --git a/base/process/launch_fuchsia.cc b/base/process/launch_fuchsia.cc
index 54591f9f8629c54d4f6f1797f0c2e3e6b205e482..882d4349b865bd9b2a92ab6e1d5fbed6e10ca17e 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;

Powered by Google App Engine
This is Rietveld 408576698