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

Issue 553283002: IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows (Closed)

Created:
6 years, 3 months ago by Hajime Morrita
Modified:
6 years, 3 months ago
CC:
chromium-reviews, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), erikwright+watch_chromium.org, ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows ChannelMojo doesn't work on Windows with existing implementaion and this CL fixes it. On Windows, ChannelHandle isn't immediately usable: The handle has to be activated through ConnectNamedPipe() windows API, which is done in its own Connect() handlshaking phase. ChannelMojo didn't Connect() underlying channel and took the ChannelHandle over so the handle wasn't activated. Instead of hijacking underlying ChannelHandle, this CL actually Connect()s underlying channel, creates a pipe on the server side, send one side of the pipe to the client process, and use the pipe for the MessagePipe initialization. These initialization task is encapsulated behind new MojoBootstrap class. ChannelMojo creates MojoBootstrap class to get the PlatformHandle which is already activated and usable. BUG=377980 TEST=ipc_mojo_bootstrap_unittest.cc, ipc_channel_mojo_unittest.cc R=viettrungluu@chromium.org, darin@chromium.org, yzshen@chromium.org Committed: https://crrev.com/54f6f80c3623a6fb9d3049b6f5e0e23b1d76c34d Cr-Commit-Position: refs/heads/master@{#296248}

Patch Set 1 #

Patch Set 2 : Fixed Linux build #

Patch Set 3 : Fixed test failure #

Patch Set 4 : Fixing windows build error #

Total comments: 42

Patch Set 5 : #

Total comments: 16

Patch Set 6 : #

Patch Set 7 : Added ChannelMojoHost #

Total comments: 18

Patch Set 8 : #

Patch Set 9 : Made it a bit smaller #

Patch Set 10 : #

Total comments: 18

Patch Set 11 : #

Patch Set 12 : Fixed build error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+697 lines, -142 lines) Patch
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 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 3 chunks +13 lines, -4 lines 0 comments Download
M content/child/child_thread.cc View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M ipc/ipc_test_base.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M ipc/ipc_test_base.cc View 1 2 3 4 5 6 7 4 chunks +35 lines, -15 lines 0 comments Download
M ipc/mojo/BUILD.gn View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +31 lines, -12 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.cc View 1 2 3 4 5 6 7 6 chunks +60 lines, -79 lines 0 comments Download
A ipc/mojo/ipc_channel_mojo_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +49 lines, -0 lines 0 comments Download
A ipc/mojo/ipc_channel_mojo_host.cc View 1 2 3 4 5 6 7 1 chunk +47 lines, -0 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo_unittest.cc View 1 2 3 4 5 6 8 chunks +43 lines, -22 lines 0 comments Download
M ipc/mojo/ipc_mojo.gyp View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
A ipc/mojo/ipc_mojo_bootstrap.h View 1 2 3 4 5 6 1 chunk +82 lines, -0 lines 0 comments Download
A ipc/mojo/ipc_mojo_bootstrap.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +205 lines, -0 lines 0 comments Download
A ipc/mojo/ipc_mojo_bootstrap_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +86 lines, -0 lines 0 comments Download
M ipc/mojo/ipc_mojo_perftest.cc View 1 2 3 4 5 6 4 chunks +16 lines, -6 lines 0 comments Download

Messages

Total messages: 20 (2 generated)
Hajime Morrita
6 years, 3 months ago (2014-09-10 01:33:07 UTC) #1
Hajime Morrita
Fixing windows build error
6 years, 3 months ago (2014-09-10 22:45:51 UTC) #2
viettrungluu
https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc#newcode2090 content/browser/renderer_host/render_process_host_impl.cc:2090: channel_->OnClientLaunched(child_process_launcher_->GetHandle()); It feels a bit suboptimal to require an ...
6 years, 3 months ago (2014-09-15 20:19:44 UTC) #3
Hajime Morrita
Thanks for the review Trung! PTAL? https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc#newcode2090 content/browser/renderer_host/render_process_host_impl.cc:2090: channel_->OnClientLaunched(child_process_launcher_->GetHandle()); On 2014/09/15 ...
6 years, 3 months ago (2014-09-15 22:01:38 UTC) #4
viettrungluu
https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/553283002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc#newcode2090 content/browser/renderer_host/render_process_host_impl.cc:2090: channel_->OnClientLaunched(child_process_launcher_->GetHandle()); On 2014/09/15 22:01:36, morrita wrote: > On 2014/09/15 ...
6 years, 3 months ago (2014-09-15 22:37:28 UTC) #5
Hajime Morrita
PTAL? https://codereview.chromium.org/553283002/diff/80001/ipc/ipc_test_base.cc File ipc/ipc_test_base.cc (right): https://codereview.chromium.org/553283002/diff/80001/ipc/ipc_test_base.cc#newcode105 ipc/ipc_test_base.cc:105: return StartClientInternal(0); On 2014/09/15 22:37:27, viettrungluu wrote: > ...
6 years, 3 months ago (2014-09-15 23:51:33 UTC) #6
Hajime Morrita
On passing the process handle, we could probably have global ID/handle map globally and look ...
6 years, 3 months ago (2014-09-15 23:52:54 UTC) #7
Hajime Morrita
Trung: PTAL? I gave up to touch ChannelProxy and Channel interface and added new class ...
6 years, 3 months ago (2014-09-17 01:15:58 UTC) #8
viettrungluu
https://codereview.chromium.org/553283002/diff/120001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/553283002/diff/120001/content/browser/renderer_host/render_process_host_impl.cc#newcode430 content/browser/renderer_host/render_process_host_impl.cc:430: : channel_host_(new IPC::ChannelMojoHost( Do you want to create this ...
6 years, 3 months ago (2014-09-17 17:33:15 UTC) #9
Hajime Morrita
PTAL? On base/ changes, I'm thinking about addressing it in a bit larger way as ...
6 years, 3 months ago (2014-09-17 19:33:48 UTC) #10
Hajime Morrita
Hi Trung, could you take another look at this? I updated the CL to make ...
6 years, 3 months ago (2014-09-22 18:18:45 UTC) #11
viettrungluu
LGTM w/nits. https://codereview.chromium.org/553283002/diff/180001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/553283002/diff/180001/content/browser/renderer_host/render_process_host_impl.h#newcode267 content/browser/renderer_host/render_process_host_impl.h:267: // A host object ChannelMojo needs. The ...
6 years, 3 months ago (2014-09-22 19:13:08 UTC) #12
Hajime Morrita
Thanks! https://codereview.chromium.org/553283002/diff/180001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/553283002/diff/180001/content/browser/renderer_host/render_process_host_impl.h#newcode267 content/browser/renderer_host/render_process_host_impl.h:267: // A host object ChannelMojo needs. The lifetime ...
6 years, 3 months ago (2014-09-22 19:32:48 UTC) #13
Hajime Morrita
Jam: Could you take a look at changes on these files? content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.h content/child/child_thread.cc - ...
6 years, 3 months ago (2014-09-22 19:35:54 UTC) #15
jam
lgtm
6 years, 3 months ago (2014-09-23 05:09:40 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/553283002/220001
6 years, 3 months ago (2014-09-23 20:36:39 UTC) #18
commit-bot: I haz the power
Committed patchset #12 (id:220001) as d72e013407c787f0953a236a6d539b88fbda0f55
6 years, 3 months ago (2014-09-23 21:16:09 UTC) #19
commit-bot: I haz the power
6 years, 3 months ago (2014-09-23 21:16:58 UTC) #20
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/54f6f80c3623a6fb9d3049b6f5e0e23b1d76c34d
Cr-Commit-Position: refs/heads/master@{#296248}

Powered by Google App Engine
This is Rietveld 408576698