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

Issue 1685183004: Bootstrap Mojo IPC independent of Chrome IPC (Closed)

Created:
4 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, Mark Dittmer, nasko+codewatch_chromium.org, piman+watch_chromium.org, qsr+mojo_chromium.org, rickyz+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, Mark Seaborn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bootstrap Mojo IPC independent of Chrome IPC This initializes Mojo IPC very early in child process startup so we can start using cross-process pipes in content without a dependency on Chrome IPC. On all supported platforms, a new OS pipe handle is passed through ChildProcessLauncher and hooked up to the EDK on ChildThreadImpl startup to establish a Mojo IPC channel to the parent. A command-line argument is also to used to share a unique pipe token with the child, and this token is exchanged over the Mojo IPC channel to bootstrap a primordial message pipe. While this CL establishes these facilities in a way that can be used for all child processes, only render processes are brought up in this way for now. BUG=583557 TEST=Chrome still runs in mash with Mus-in-renderer support. Committed: https://crrev.com/eb199fbaecd8e5d294010dfbe8897b7d83aeab07 Cr-Commit-Position: refs/heads/master@{#378272}

Patch Set 1 #

Patch Set 2 : better #

Patch Set 3 : even better #

Patch Set 4 : fix single process #

Patch Set 5 : #

Patch Set 6 : moar single process #

Patch Set 7 : fix android #

Patch Set 8 : always create a pipe, make it safer to fail shell connection #

Patch Set 9 : Windows! #

Patch Set 10 : rebase #

Patch Set 11 : and fix posix #

Total comments: 2

Patch Set 12 : rebase #

Patch Set 13 : inherit le handles #

Patch Set 14 : rebase #

Patch Set 15 : #

Patch Set 16 : moar rebase #

Patch Set 17 : rebase #

Patch Set 18 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -127 lines) Patch
M content/app/content_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.h View 1 2 3 4 5 6 9 10 11 12 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +34 lines, -5 lines 0 comments Download
M content/browser/mojo/mojo_shell_client_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -7 lines 0 comments Download
M content/browser/mojo/mojo_shell_client_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +19 lines, -62 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +6 lines, -14 lines 0 comments Download
M content/child/child_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +0 lines, -5 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +33 lines, -26 lines 0 comments Download
M content/common/mojo/mojo_messages.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/common/zygote_fork_delegate_linux.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/zygote/zygote_linux.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ipc/ipc_descriptors.h View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/edk/embedder/platform_channel_pair.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -3 lines 0 comments Download
M mojo/edk/system/node_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (23 generated)
Ken Rockot(use gerrit already)
as requested, here's some bits of the CL in progress. this compiles and bootstraps render ...
4 years, 10 months ago (2016-02-11 01:57:55 UTC) #2
Ken Rockot(use gerrit already)
Ben, please take a look. This is a working end-to-end solution for POSIX - i.e. ...
4 years, 10 months ago (2016-02-11 05:25:10 UTC) #5
Ben Goodger (Google)
So rather than inventing a new interface, can you just have the child processes implement ...
4 years, 10 months ago (2016-02-11 06:32:20 UTC) #6
Ken Rockot(use gerrit already)
On Wed, Feb 10, 2016 at 10:32 PM, Ben Goodger (Google) <ben@chromium.org> wrote: > So ...
4 years, 10 months ago (2016-02-11 06:36:14 UTC) #9
Ben Goodger (Google)
Why can't the renderer just use the Shell API to connect to a ChromeIPCFactory interface ...
4 years, 10 months ago (2016-02-11 06:49:12 UTC) #10
Ken Rockot(use gerrit already)
It can, but what's the practical benefit of doing that? On Wed, Feb 10, 2016 ...
4 years, 10 months ago (2016-02-11 07:06:48 UTC) #11
Ken Rockot(use gerrit already)
In current desktop Chrome with no external shell the two approaches are essentially equivalent - ...
4 years, 10 months ago (2016-02-11 07:20:38 UTC) #12
Ken Rockot(use gerrit already)
Another palatable option might to make it easy for an app runner and an app ...
4 years, 10 months ago (2016-02-11 07:26:53 UTC) #13
Ben Goodger (Google)
If you don't use ChildController you're going to have to bootstrap RunnerConnection manually in the ...
4 years, 10 months ago (2016-02-11 07:30:00 UTC) #14
Ken Rockot(use gerrit already)
On 2016/02/11 at 07:30:00, ben wrote: > If you don't use ChildController you're going to ...
4 years, 10 months ago (2016-02-11 07:54:49 UTC) #15
Ben Goodger (Google)
Hurray!
4 years, 10 months ago (2016-02-11 20:26:17 UTC) #17
Ken Rockot(use gerrit already)
On 2016/02/11 at 20:26:17, ben wrote: > Hurray! Yar, it works well! I'll sort out ...
4 years, 10 months ago (2016-02-11 20:30:03 UTC) #18
Ken Rockot(use gerrit already)
OK, I think this is about ready for review. Ben could you take a look ...
4 years, 10 months ago (2016-02-13 00:04:28 UTC) #21
Ken Rockot(use gerrit already)
Actually adding the right people this time. Message duped below: OK, I think this is ...
4 years, 10 months ago (2016-02-13 00:23:23 UTC) #24
jam
On 2016/02/13 00:23:23, Ken Rockot wrote: > Actually adding the right people this time. Message ...
4 years, 10 months ago (2016-02-13 04:15:13 UTC) #25
Ken Rockot(use gerrit already)
Thanks! Adding jschuh for Windows sandbox expertise. https://codereview.chromium.org/1685183004/diff/180001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1685183004/diff/180001/content/browser/renderer_host/render_process_host_impl.cc#newcode1628 content/browser/renderer_host/render_process_host_impl.cc:1628: shell_pipe_token_); On ...
4 years, 10 months ago (2016-02-13 04:35:10 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685183004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685183004/220001
4 years, 10 months ago (2016-02-16 18:26:37 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-16 20:49:13 UTC) #33
Ken Rockot(use gerrit already)
jschuch and +pennymac : I've updated the Windows launching code to use handle inheritance. Please ...
4 years, 10 months ago (2016-02-17 00:19:45 UTC) #36
Ken Rockot(use gerrit already)
Oh, also content/common/sandbox{_init.h,_win.cc} of course
4 years, 10 months ago (2016-02-17 00:23:32 UTC) #38
jschuh
On 2016/02/17 00:23:32, Ken Rockot wrote: > Oh, also content/common/sandbox{_init.h,_win.cc} of course Could you split ...
4 years, 10 months ago (2016-02-17 05:15:58 UTC) #39
jam
fwiw, the code i reviewed before still lgtm (well, of course it's better :) )
4 years, 10 months ago (2016-02-17 16:44:49 UTC) #40
Ken Rockot(use gerrit already)
Ping tsepez@ - could you please take a look for content/common/mojo/messages.h? Just deleting an IPC.
4 years, 10 months ago (2016-02-26 23:31:07 UTC) #42
jschuh
lgtm for ipc security.
4 years, 9 months ago (2016-02-29 19:34:35 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685183004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685183004/340001
4 years, 9 months ago (2016-02-29 20:01:38 UTC) #46
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years, 9 months ago (2016-02-29 21:15:30 UTC) #47
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/eb199fbaecd8e5d294010dfbe8897b7d83aeab07 Cr-Commit-Position: refs/heads/master@{#378272}
4 years, 9 months ago (2016-02-29 21:16:38 UTC) #49
Ken Rockot(use gerrit already)
4 years, 9 months ago (2016-03-01 02:22:51 UTC) #51
Message was sent while issue was closed.
A revert of this CL (patchset #18 id:340001) has been created in
https://codereview.chromium.org/1748973003/ by rockot@chromium.org.

The reason for reverting is: Breaking NaCl in a way that somehow was not caught
in the CQ... :{

Will reland once that's sorted out.
.

Powered by Google App Engine
This is Rietveld 408576698