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

Issue 2950153002: Improve process launch handle sharing API. (Closed)

Created:
3 years, 6 months ago by brettw
Modified:
3 years, 5 months ago
CC:
chromium-reviews, vakh+watch_chromium.org, vmpstr+watch_chromium.org, alito+watch_chromium.org, yzshen+watch_chromium.org, pennymac+watch_chromium.org, abarth-chromium, qsr+mojo_chromium.org, cbentzel+watch_chromium.org, grt+watch_chromium.org, viettrungluu+watch_chromium.org, jam, net-reviews_chromium.org, darin-cc_chromium.org, csharp+watch_chromium.org, chromoting-reviews_chromium.org, joenotcharles+watch_chromium.org, timvolodine, asvitkine+watch_chromium.org, darin (slow to review), wfh+watch_chromium.org, Aaron Boodman, danakj+watch_chromium.org, ftirelo+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve process launch handle sharing API. Makes handles_to_inherit and fds_to_remap in base::LaunchOptions to be regular data members instead of pointers. This simplifies all users of these objects. On Windows, inherit_handles boolean is changed to an enum, and the relationship between this and handlers_to_inherit is clarified. Extra comments are added about inheritance of the standard handles. The rest of this change is related fallout: Remove support for XP in browser_watcher. Some blocks of CHECK(false) that were inside OFFICIAL_BUILD blocks in Mojo were removed. These were previously added for Windows XP support when all handles needed to be shared (XP didn't support a list). When XP support was removed here: https://codereview.chromium.org/1801963002 the CHECK was retained even though it was explicitly set to only share a whitelist of handles. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2950153002 Cr-Commit-Position: refs/heads/master@{#489181} Committed: https://chromium.googlesource.com/chromium/src/+/3c98c7d3c8b37108ed1dc1a72ce5d3106eccb6c6

Patch Set 1 #

Patch Set 2 : Format #

Patch Set 3 : Mojo fix #

Patch Set 4 : Fixes #

Patch Set 5 : Fixes #

Patch Set 6 : Test launcher #

Patch Set 7 : Services fix + merge #

Patch Set 8 : Mac #

Patch Set 9 : Fix #

Total comments: 10

Patch Set 10 : Merge + grt review #

Patch Set 11 : Fixes #

Patch Set 12 : Fix #

Total comments: 4

Patch Set 13 : Fix Mojo launcher, review comments #

Total comments: 7

Patch Set 14 : Review comments and merge #

Patch Set 15 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -690 lines) Patch
M android_webview/browser/aw_browser_terminator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_browser_terminator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M base/process/launch.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +44 lines, -22 lines 0 comments Download
M base/process/launch_fuchsia.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -6 lines 0 comments Download
M base/process/launch_mac.cc View 1 1 chunk +13 lines, -15 lines 0 comments Download
M base/process/launch_posix.cc View 1 2 chunks +8 lines, -15 lines 0 comments Download
M base/process/launch_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +32 lines, -34 lines 0 comments Download
M base/process/process_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +4 lines, -13 lines 0 comments Download
M base/test/launcher/test_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -4 lines 0 comments Download
M base/test/launcher/test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +18 lines, -22 lines 0 comments Download
M base/test/multiprocess_test_android.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M base/win/wait_chain_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/mac/relauncher.mm View 1 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/profiling_host/profiling_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/shell_integration_linux.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/installer/util/user_experiment.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/base/mojo_test_connector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -12 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/utility/image_writer/image_writer_mac.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/utility/importer/firefox_importer_unittest_utils_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -4 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chromeos/process_proxy/process_proxy.cc View 1 1 chunk +5 lines, -6 lines 0 comments Download
M components/arc/crash_collector/arc_crash_collector_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -4 lines 0 comments Download
M components/browser_watcher/watcher_client_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -5 lines 0 comments Download
M components/browser_watcher/window_hang_monitor_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M components/crash/content/browser/crash_dump_manager_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/crash/content/browser/crash_dump_manager_android.cc View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download
M components/crash/content/browser/crash_dump_observer_android.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M components/crash/content/browser/crash_dump_observer_android.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/zygote/nacl_fork_delegate_linux.cc View 1 3 chunks +5 lines, -6 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/child_process_launcher_helper.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -6 lines 0 comments Download
M content/browser/child_process_launcher_helper_android.cc View 1 2 3 4 4 chunks +6 lines, -7 lines 0 comments Download
M content/browser/child_process_launcher_helper_linux.cc View 1 2 chunks +4 lines, -8 lines 0 comments Download
M content/browser/child_process_launcher_helper_mac.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +5 lines, -11 lines 0 comments Download
M content/browser/child_process_launcher_helper_posix.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/child_process_launcher_helper_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
D content/browser/file_descriptor_info_impl.h View 1 1 chunk +0 lines, -53 lines 0 comments Download
D content/browser/file_descriptor_info_impl.cc View 1 1 chunk +0 lines, -107 lines 0 comments Download
D content/browser/file_descriptor_info_impl_unittest.cc View 1 1 chunk +0 lines, -86 lines 0 comments Download
A + content/browser/posix_file_descriptor_info_impl.h View 1 3 chunks +13 lines, -11 lines 0 comments Download
A content/browser/posix_file_descriptor_info_impl.cc View 1 1 chunk +111 lines, -0 lines 0 comments Download
A + content/browser/posix_file_descriptor_info_impl_unittest.cc View 1 2 3 4 4 chunks +14 lines, -11 lines 0 comments Download
M content/browser/zygote_host/zygote_communication_linux.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/zygote_host/zygote_communication_linux.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/zygote_host/zygote_host_impl_linux.cc View 1 1 chunk +4 lines, -6 lines 0 comments Download
M content/common/sandbox_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -5 lines 0 comments Download
M content/public/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
D content/public/browser/file_descriptor_info.h View 1 1 chunk +0 lines, -63 lines 0 comments Download
A + content/public/browser/posix_file_descriptor_info.h View 1 4 chunks +12 lines, -11 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M headless/lib/browser/headless_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M headless/lib/browser/headless_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M mojo/edk/test/multiprocess_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -12 lines 0 comments Download
M net/test/spawned_test_server/local_test_server_posix.cc View 1 2 3 2 chunks +1 line, -4 lines 0 comments Download
M net/test/spawned_test_server/local_test_server_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M sandbox/linux/services/namespace_sandbox_unittest.cc View 1 2 3 2 chunks +9 lines, -10 lines 0 comments Download
M sandbox/linux/suid/client/setuid_sandbox_host.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M sandbox/linux/suid/client/setuid_sandbox_host.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M sandbox/win/src/broker_services.cc View 1 chunk +1 line, -2 lines 0 comments Download
M services/service_manager/runner/host/service_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -8 lines 0 comments Download
M services/service_manager/tests/service_manager/service_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -8 lines 0 comments Download
M services/service_manager/tests/util.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 100 (72 generated)
brettw
Mojo fix
3 years, 6 months ago (2017-06-21 23:30:36 UTC) #14
brettw
Fixes
3 years, 6 months ago (2017-06-22 00:31:26 UTC) #19
brettw
Fixes
3 years, 6 months ago (2017-06-22 01:21:49 UTC) #24
brettw
Test launcher
3 years, 6 months ago (2017-06-22 01:58:48 UTC) #29
brettw
Services fix + merge
3 years, 5 months ago (2017-06-26 17:53:20 UTC) #34
brettw
Mac
3 years, 5 months ago (2017-06-26 18:29:04 UTC) #39
brettw
Fix
3 years, 5 months ago (2017-06-26 20:50:43 UTC) #44
brettw
Sorry, Justin suggested you for this. Don't be scared by the number of files, since ...
3 years, 5 months ago (2017-06-26 21:00:30 UTC) #50
grt (UTC plus 2)
a few drive-by nits from a quick surface scan of launch.h and launch_win. not adding ...
3 years, 5 months ago (2017-06-27 08:01:44 UTC) #51
Will Harris
First impression, without even looking at this, can the CL be split into a "non-behavior ...
3 years, 5 months ago (2017-06-27 09:26:49 UTC) #52
brettw
On 2017/06/27 09:26:49, Will Harris (UTC TZ) wrote: > First impression, without even looking at ...
3 years, 5 months ago (2017-06-28 21:29:12 UTC) #53
brettw
Merge + grt review
3 years, 5 months ago (2017-06-28 21:42:05 UTC) #54
brettw
New patch up. https://codereview.chromium.org/2950153002/diff/160001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/2950153002/diff/160001/base/process/launch.h#newcode19 base/process/launch.h:19: #include "base/optional.h" On 2017/06/27 08:01:44, grt ...
3 years, 5 months ago (2017-06-28 21:42:22 UTC) #56
brettw
Fixes
3 years, 5 months ago (2017-06-29 00:02:50 UTC) #60
brettw
Fix
3 years, 5 months ago (2017-06-29 04:04:26 UTC) #65
Joe Mason
https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h#newcode42 base/process/launch.h:42: #elif defined(OS_FUCHSIA) Is OS_POSIX also defined when OS_FUCHSIA is? ...
3 years, 5 months ago (2017-07-04 18:26:56 UTC) #71
Joe Mason
https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h#newcode39 base/process/launch.h:39: typedef std::vector<std::pair<int, int>> FileHandleMappingVector; From the CL desc: "Name ...
3 years, 5 months ago (2017-07-04 18:30:35 UTC) #72
brettw
Fix Mojo launcher, review comments
3 years, 5 months ago (2017-07-05 19:13:31 UTC) #74
brettw
Thanks, new snap up. https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/2950153002/diff/220001/base/process/launch.h#newcode39 base/process/launch.h:39: typedef std::vector<std::pair<int, int>> FileHandleMappingVector; Will ...
3 years, 5 months ago (2017-07-05 19:13:51 UTC) #77
brettw
3 years, 5 months ago (2017-07-24 18:54:51 UTC) #85
jschuh
Lgtm on all the Windows stuff with some nits. I think you're inheriting with kAll ...
3 years, 5 months ago (2017-07-24 19:41:27 UTC) #86
brettw
Review comments and merge
3 years, 5 months ago (2017-07-24 23:35:12 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2950153002/260001
3 years, 5 months ago (2017-07-24 23:35:25 UTC) #90
brettw
https://codereview.chromium.org/2950153002/diff/240001/mojo/edk/test/multiprocess_test_helper.cc File mojo/edk/test/multiprocess_test_helper.cc (right): https://codereview.chromium.org/2950153002/diff/240001/mojo/edk/test/multiprocess_test_helper.cc#newcode141 mojo/edk/test/multiprocess_test_helper.cc:141: options.inherit_mode = base::LaunchOptions::Inherit::kAll; On 2017/07/24 19:41:27, jschuh wrote: > ...
3 years, 5 months ago (2017-07-24 23:35:30 UTC) #91
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/498213) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 5 months ago (2017-07-24 23:40:23 UTC) #93
brettw
Merge
3 years, 5 months ago (2017-07-24 23:59:32 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2950153002/280001
3 years, 5 months ago (2017-07-24 23:59:47 UTC) #97
commit-bot: I haz the power
3 years, 5 months ago (2017-07-25 01:44:41 UTC) #100
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/3c98c7d3c8b37108ed1dc1a72ce5...

Powered by Google App Engine
This is Rietveld 408576698