summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc_channel_mojo_host.cc
Commit message (Collapse)AuthorAgeFilesLines
* ChannelMojo: Handle when ChannelMojo outlives ChannelMojoHostmorrita2014-09-261-20/+88
| | | | | | | | | | | | | | | | | | | In some case ChannelMojo outlives ChannelMojoHost because two objects are living in diffent thread. Instead of using lifecycle callbacks, this CL relies on WeakPtr. See comment on ipc_channel_mojo_host.h for more details. This CL also fixes a crash on --single-process mode. R=viettrungluu@chromium.org TBR=jam@chromium.org TEST=content_browsertests (with --enable-renderer-mojo-channel on) BUG=377980 Review URL: https://codereview.chromium.org/599333002 Cr-Commit-Position: refs/heads/master@{#296871}
* IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windowsmorrita2014-09-231-0/+47
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 Review URL: https://codereview.chromium.org/553283002 Cr-Commit-Position: refs/heads/master@{#296248}