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

Issue 2163633003: Support early associated interface binding on ChannelMojo (Closed)

Created:
4 years, 5 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 5 months ago
Reviewers:
yzshen1
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@explicit-channel-ipc-task-runner
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support early associated interface binding on ChannelMojo Changes the associated bindings implementation for ChannelMojo such that remote interfaces can be acquired immediately upon ChannelMojo construction rather than having to wait for connection on the IO thread. Simplifies the Channel bootstrapping process, removing a round-trip Init message (and in fact the entire IPC::mojom::Boostrap interface) since there's no need to actually exchange associated interface handles over the pipe. Instead both sides can assume the other will use a fixed, reserved endpoint ID for their IPC::mojom::Channel interface. This also removes the restriction that associated interfaces must be added to a Channel after Init. Instead the same constraints apply as with AddFilter: an associated interface, like a filter, may be added at any time as long as either Init hasn't been called OR the remote process hasn't been launched. The result of this CL is that any place it's safe to AddFilter, it's also safe to AddAssociatedInterface; and any place it's safe to Send, it's also safe to GetRemoteAssociatedInterface and begin using any such remote interface immediately. Remote interface requests as well as all messages to remote interfaces retain FIFO with respect to any Send calls on the same thread. Local interface request dispatch as well as all messages on locally bound associated interfaces retain FIFO with respect to any OnMessageReceived calls on the same thread. BUG=612500, 619202 Committed: https://crrev.com/e1037f997da9e1d44ca3b09d4ff32f0465673091 Committed: https://crrev.com/508da24622f957a01b076ccd058bfdccc79068a4 Committed: https://crrev.com/0e4de5f9a519c6cd206448a10eccc7a535e3db64 Cr-Original-Original-Commit-Position: refs/heads/master@{#406720} Cr-Original-Commit-Position: refs/heads/master@{#407050} Cr-Commit-Position: refs/heads/master@{#407264}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 6

Patch Set 4 : . #

Total comments: 6

Patch Set 5 : nits #

Patch Set 6 : compensate for goofy BrowserThreadTaskRunner + MessageLoop::DestructionObserver interaction #

Patch Set 7 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -593 lines) Patch
M ipc/ipc.mojom View 1 chunk +6 lines, -10 lines 0 comments Download
M ipc/ipc_channel.h View 2 chunks +3 lines, -7 lines 0 comments Download
M ipc/ipc_channel_mojo.h View 1 2 3 5 chunks +10 lines, -25 lines 0 comments Download
M ipc/ipc_channel_mojo.cc View 1 2 3 4 8 chunks +56 lines, -98 lines 0 comments Download
M ipc/ipc_channel_mojo_unittest.cc View 1 2 6 chunks +14 lines, -12 lines 0 comments Download
M ipc/ipc_channel_proxy.h View 1 2 3 4 5 6 5 chunks +18 lines, -12 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 3 4 5 6 5 chunks +40 lines, -38 lines 0 comments Download
M ipc/ipc_message_pipe_reader.h View 1 2 3 6 chunks +4 lines, -17 lines 0 comments Download
M ipc/ipc_message_pipe_reader.cc View 1 2 3 3 chunks +10 lines, -10 lines 0 comments Download
M ipc/ipc_mojo_bootstrap.h View 2 chunks +8 lines, -40 lines 0 comments Download
M ipc/ipc_mojo_bootstrap.cc View 1 2 3 4 5 16 chunks +158 lines, -310 lines 0 comments Download
M ipc/ipc_mojo_bootstrap_unittest.cc View 3 chunks +9 lines, -13 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 59 (37 generated)
Ken Rockot(use gerrit already)
Please take a look
4 years, 5 months ago (2016-07-19 21:03:43 UTC) #4
yzshen1
https://codereview.chromium.org/2163633003/diff/40001/ipc/ipc_channel_mojo.cc File ipc/ipc_channel_mojo.cc (right): https://codereview.chromium.org/2163633003/diff/40001/ipc/ipc_channel_mojo.cc#newcode300 ipc/ipc_channel_mojo.cc:300: associated_interfaces_.clear(); A few questions about lock usage: - Is ...
4 years, 5 months ago (2016-07-20 17:13:15 UTC) #15
Ken Rockot(use gerrit already)
Thanks, I've addressed your comments. The new patch set also eliminates the deferred MessagePipeReader deleter ...
4 years, 5 months ago (2016-07-20 21:08:39 UTC) #18
yzshen1
LGTM with a few nits. Thanks! https://codereview.chromium.org/2163633003/diff/60001/ipc/ipc_channel_mojo.cc File ipc/ipc_channel_mojo.cc (right): https://codereview.chromium.org/2163633003/diff/60001/ipc/ipc_channel_mojo.cc#newcode297 ipc/ipc_channel_mojo.cc:297: // avoid deadlock ...
4 years, 5 months ago (2016-07-20 22:54:52 UTC) #21
yzshen1
LGTM with a few nits. Thanks!
4 years, 5 months ago (2016-07-20 22:54:52 UTC) #22
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2163633003/diff/60001/ipc/ipc_channel_mojo.cc File ipc/ipc_channel_mojo.cc (right): https://codereview.chromium.org/2163633003/diff/60001/ipc/ipc_channel_mojo.cc#newcode297 ipc/ipc_channel_mojo.cc:297: // avoid deadlock when freeing it below. On 2016/07/20 ...
4 years, 5 months ago (2016-07-20 23:10:20 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2163633003/80001
4 years, 5 months ago (2016-07-20 23:10:48 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-21 00:13:38 UTC) #27
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/e1037f997da9e1d44ca3b09d4ff32f0465673091 Cr-Commit-Position: refs/heads/master@{#406720}
4 years, 5 months ago (2016-07-21 00:16:47 UTC) #29
dominickn
On 2016/07/21 00:16:47, commit-bot: I haz the power wrote: > Patchset 5 (id:??) landed as ...
4 years, 5 months ago (2016-07-21 01:31:05 UTC) #30
Ken Rockot(use gerrit already)
That's odd. Reverting. On Wed, Jul 20, 2016 at 6:31 PM, <dominickn@chromium.org> wrote: > On ...
4 years, 5 months ago (2016-07-21 01:32:51 UTC) #31
Ken Rockot(use gerrit already)
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2167973002/ by rockot@chromium.org. ...
4 years, 5 months ago (2016-07-21 01:33:06 UTC) #32
Ken Rockot(use gerrit already)
Revert landed. Possibly bad interaction with another channel-related change that landed at almost the same ...
4 years, 5 months ago (2016-07-21 01:37:08 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2163633003/120001
4 years, 5 months ago (2016-07-22 01:45:44 UTC) #48
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-22 03:54:19 UTC) #49
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/508da24622f957a01b076ccd058bfdccc79068a4 Cr-Commit-Position: refs/heads/master@{#407050}
4 years, 5 months ago (2016-07-22 03:57:00 UTC) #51
msramek
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2173753002/ by msramek@chromium.org. ...
4 years, 5 months ago (2016-07-22 10:05:34 UTC) #52
Ken Rockot(use gerrit already)
Turns out this latest trouble is simply caused by an invalid DCHECK in mojo internals. ...
4 years, 5 months ago (2016-07-22 19:46:47 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2163633003/120001
4 years, 5 months ago (2016-07-22 21:14:06 UTC) #55
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-22 21:18:25 UTC) #56
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/0e4de5f9a519c6cd206448a10eccc7a535e3db64 Cr-Commit-Position: refs/heads/master@{#407264}
4 years, 5 months ago (2016-07-22 21:21:27 UTC) #58
Mark P
4 years, 5 months ago (2016-07-23 03:57:30 UTC) #59
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/2173303002/ by mpearson@chromium.org.

The reason for reverting is: Causes failures on Windows Unit (DrMemory) in
memory test: ipc_tests
https://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%2...

---
IPCChannelMojoTest.SendFailWithPendingMessages:
c:\b\build\slave\drm-cr\build\src\ipc\ipc_channel_mojo_unittest.cc(290): error:
Value of: listener.has_error()
Actual: false
Expected: true
---
.

Powered by Google App Engine
This is Rietveld 408576698