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

Issue 1130413002: Mojo IPC threading fixes (Closed)

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

Description

Mojo IPC threading fixes Two independent but related fixes here: 1. IPCSupportInitializer could previously outlive its IO runner, resulting in Mojo not being shut down in time. The EDK posts tasks directly to a MessageLoopForIO pointer because it's assumed to remain valid until EDK shutdown. This CL limits IPCSupportInitializer's lifetime to that of the IO thread, regardless of ScopedIPCSupport lifetime. 2. In single-process mode, the child IO thread cannot be used to create the client ChannelMojo, because all channels in-process must be created on the EDK IO thread. This problem only surfaced in practice because #1 above changed some shutdown ordering and tickled a DCHECK in EDK shutdown. This CL has ChannelMojo hop to its IO runner (only if necessary) before creating underlying messaging pipes. BUG=None R=morrita@chromium.org Committed: https://crrev.com/dbb3bb6bfa0b222fb6745608cd571bb0ec8bef39 Cr-Commit-Position: refs/heads/master@{#329262}

Patch Set 1 #

Patch Set 2 : Additional IPCSupportInitializer cleanup #

Patch Set 3 : Initialize raw observer ptr #

Patch Set 4 : Clean up ChannelMojo #

Patch Set 5 : Correct some outdated expectations during shutdown #

Total comments: 4

Patch Set 6 : Force shutdown on the correct thread #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -69 lines) Patch
M ipc/mojo/ipc_channel_mojo.h View 1 2 3 4 5 4 chunks +21 lines, -2 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.cc View 1 2 3 4 11 chunks +82 lines, -14 lines 1 comment Download
M ipc/mojo/scoped_ipc_support.cc View 1 2 3 4 5 2 chunks +130 lines, -53 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
Ken Rockot(use gerrit already)
morrita, could you please take a look?
5 years, 7 months ago (2015-05-08 16:26:21 UTC) #2
Ken Rockot(use gerrit already)
It occurs to me that morrita may no longer be doing code reviews here. Trung, ...
5 years, 7 months ago (2015-05-08 21:16:11 UTC) #8
jam
https://codereview.chromium.org/1130413002/diff/140001/ipc/mojo/ipc_channel_mojo.h File ipc/mojo/ipc_channel_mojo.h (right): https://codereview.chromium.org/1130413002/diff/140001/ipc/mojo/ipc_channel_mojo.h#newcode143 ipc/mojo/ipc_channel_mojo.h:143: explicit ChannelInfoDeleter(scoped_refptr<base::TaskRunner> io_runer); nit: io_runner https://codereview.chromium.org/1130413002/diff/140001/ipc/mojo/scoped_ipc_support.cc File ipc/mojo/scoped_ipc_support.cc (right): ...
5 years, 7 months ago (2015-05-11 15:53:26 UTC) #10
Ken Rockot(use gerrit already)
Thanks for the review https://codereview.chromium.org/1130413002/diff/140001/ipc/mojo/ipc_channel_mojo.h File ipc/mojo/ipc_channel_mojo.h (right): https://codereview.chromium.org/1130413002/diff/140001/ipc/mojo/ipc_channel_mojo.h#newcode143 ipc/mojo/ipc_channel_mojo.h:143: explicit ChannelInfoDeleter(scoped_refptr<base::TaskRunner> io_runer); On 2015/05/11 ...
5 years, 7 months ago (2015-05-11 16:11:53 UTC) #11
jam
lgtm from my part; I'll defer to vtl if he's reviewing.
5 years, 7 months ago (2015-05-11 20:56:05 UTC) #12
Hajime Morrita
lgtm on ipc/mojo https://codereview.chromium.org/1130413002/diff/160001/ipc/mojo/ipc_channel_mojo.cc File ipc/mojo/ipc_channel_mojo.cc (right): https://codereview.chromium.org/1130413002/diff/160001/ipc/mojo/ipc_channel_mojo.cc#newcode146 ipc/mojo/ipc_channel_mojo.cc:146: base::WeakPtrFactory<ServerChannelMojo> weak_factory_; Having weak_factory_ for Channel ...
5 years, 7 months ago (2015-05-11 22:19:21 UTC) #13
Ken Rockot(use gerrit already)
Thanks
5 years, 7 months ago (2015-05-11 22:41:11 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1130413002/160001
5 years, 7 months ago (2015-05-11 22:43:57 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:160001)
5 years, 7 months ago (2015-05-11 22:53:32 UTC) #17
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 22:54:14 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/dbb3bb6bfa0b222fb6745608cd571bb0ec8bef39
Cr-Commit-Position: refs/heads/master@{#329262}

Powered by Google App Engine
This is Rietveld 408576698