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 Review URL: https://codereview.chromium.org/1130413002 Cr-Commit-Position: refs/heads/master@{#329262}
Showing
Please register or sign in to comment