summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc_channel_mojo.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move mojo edk into mojo/edkjamesr2014-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | This creates a mojo/edk directory which contains the "embedder developer kit" aka the set of code needed to embed mojo code. mojo/edk/embedder = code from mojo/embedder mojo/edk/system = code from mojo/system mojo/edk/test = code used to test the previous two, from mojo/common/test mojo/edk/ can only depend on mojo/public/, base/ and itself. R=viettrungluu@chromium.org TBR=sky@chromium.org for file renames Committed: https://chromium.googlesource.com/chromium/src/+/ee7ff197a98da4636f33bd713de784948b487bd4 Review URL: https://codereview.chromium.org/621153003 Cr-Commit-Position: refs/heads/master@{#297986}
* Revert "Move mojo edk into mojo/edk"Trent Apted2014-10-031-1/+1
| | | | | | | | | | | | | | | This reverts commit ee7ff197a98da4636f33bd713de784948b487bd4. Causing widespread checkdeps failures. ERROR in src\content\browser\webui\web_ui_mojo_browsertest.cc Illegal include: "mojo/edk/test/test_utils.h" Because of no rule applying. TBR=jamesr@chromium.org Review URL: https://codereview.chromium.org/623883002 Cr-Commit-Position: refs/heads/master@{#297966}
* Move mojo edk into mojo/edkJames Robinson2014-10-031-1/+1
| | | | | | | | | | | | | | | | | This creates a mojo/edk directory which contains the "embedder developer kit" aka the set of code needed to embed mojo code. mojo/edk/embedder = code from mojo/embedder mojo/edk/system = code from mojo/system mojo/edk/test = code used to test the previous two, from mojo/common/test mojo/edk/ can only depend on mojo/public/, base/ and itself. R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/621153003 Cr-Commit-Position: refs/heads/master@{#297958}
* ChannelMojo: Handle when ChannelMojo outlives ChannelMojoHostmorrita2014-09-261-17/+27
| | | | | | | | | | | | | | | | | | | 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}
* Remove IPC::Channel::TakePipeHandle()morrita2014-09-251-5/+0
| | | | | | | | | | | It doesn't work, and it is no longer used. BUG=416208 R=cpu@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/601563002 Cr-Commit-Position: refs/heads/master@{#296820}
* IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Messagemorrita2014-09-241-6/+13
| | | | | | | | | | | | | | | This is a step toward to killing FileDescriptor. This change lets FiileDescriptorSet have both Files (for owning fds) and PlatformFiles (for non-owning fds). Doing this, we no longer need FileDescriptor which provides |auto_close| flag. BUG=415294 TEST=ipc_tests, ipc_mojo_unittests R=agl@chromium.org, jam@hcromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/583473002 Cr-Commit-Position: refs/heads/master@{#296498}
* IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windowsmorrita2014-09-231-79/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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}
* ChannelMojo: Handle errors in pending message processing.morrita2014-09-161-1/+6
| | | | | | | | | | | | | | | | | ChannelMojo::OnConnect() ignores errors in Send() but the error results deleting |message_readrer_| which causes null access. This CL add an error check for that. This also adds some hooks to make this testable by faking lower level API. TEST=ipc_channel_mojo_unittest.cc BUG=410813 R=yzshen@chromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/554363004 Cr-Commit-Position: refs/heads/master@{#294997}
* Refactoring: Move MessagePipeReader subclasess out from ChannelMojomorrita2014-09-111-372/+73
| | | | | | | | | | | | | | | | | There are a few MessagePipeReader sublcasses defined as inter-classes of ChannelMojo. This makes it harder to hook them for unit testing. This CL moves these classes their own file. Now unittest can define subclasses of these to hook some behavor for testing. This is a preparation for a crash fix. BUG=410813 TEST=none R=viettrungluu@chromium.org,yzshen@chromium.org Review URL: https://codereview.chromium.org/559723002 Cr-Commit-Position: refs/heads/master@{#294439}
* Add ipc_mojo_perftestsmorrita2014-09-091-10/+2
| | | | | | | | | | | | | | | | This change adds ipc_mojo_perftests that runs the same benchmark as of ipc_perftests. Now head-to-head comparison becomes possible. For this change, whole ipc_perftests logic is extracted to ipc_perftest_support.cc to make it reusable by ipc_mojo_perftests. TEST=none BUG=none R=jam@chromium.org, darin@chromium.org, yuzhu@chromium.org Review URL: https://codereview.chromium.org/536213002 Cr-Commit-Position: refs/heads/master@{#293988}
* Declaring the weak_ptr_factory in proper order.anujk.sharma2014-08-281-3/+3
| | | | | | | | | | | | Cleaning up weak_ptr_factory destruction order in "src/ipc" module. WeakPtrFactory should remain the last member so it'll be destroyed and invalidate its weak pointers before any other members are destroyed. BUG=303818 Review URL: https://codereview.chromium.org/508903002 Cr-Commit-Position: refs/heads/master@{#292334}
* Remove implicit conversions from scoped_refptr to T* in ipc/dcheng2014-08-271-1/+1
| | | | | | | | | | | This patch was generated by running the rewrite_scoped_refptr clang tool on a Linux build. BUG=110610 Review URL: https://codereview.chromium.org/507773002 Cr-Commit-Position: refs/heads/master@{#292130}
* Convert IPC::ChannelMojo initialization to use new ↵viettrungluu@chromium.org2014-08-121-36/+24
| | | | | | | | | | | | | mojo::embedder::CreateChannelOnIOThread(). (Also simplify things a bit.) R=morrita@chromium.org Review URL: https://codereview.chromium.org/459613009 Cr-Commit-Position: refs/heads/master@{#289071} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289071 0039d316-1c4b-4281-b951-d872f2087c98
* IPC::ChannelMojo: Dup and own fds to transmitmorrita@chromium.org2014-08-091-2/+14
| | | | | | | | | | | | | | | | | IPC::ChannelMojo::Send() overly closed given handles as it took the lifecycle model incorrectly. This change properly delegates the ownership of the files by using dup(). TEST=browser_tests (with ChannelMojo enabled) BUG=none R=viettrungluu@chromium.org, darin@chromium.org Review URL: https://codereview.chromium.org/452293003 Cr-Commit-Position: refs/heads/master@{#288532} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288532 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+596
This CL introduces ChannelMojo IPC::Channel implementation and optionally applies it for renderer-browser IPC channel. Current stability is like 5-seconds browser and There are rough edges. It often closes the channel so needs to be more robust. Even though the level of stability, having it in the tree will helps team to try and improve it. BUG=377980 R=darin@chromium.org,jam@chromium.org,viettrungluu@chromium.org TEST=ipc_channel_mojo_unittest.cc Review URL: https://codereview.chromium.org/382333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287402 0039d316-1c4b-4281-b951-d872f2087c98