DescriptionIPC::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 #
Messages
Total messages: 20 (2 generated)
|