Fix shutdown assert in new Mojo EDK.
The problem was that on IO thread shutdown there could be a pending task to call CloseOnIO. The deletion of this pending task can free the last reference to MessagePipeDispatcher (or other dispatchers) that are holding on to a RawChannel. The destructor would then assert because channel_ was alive. The fix is to detect this case and destruct the channel, since it's safe as we're on the IO thread.
I only saw this when running with --v8-pac-mojo-out-of-process.
BUG=561803
Review URL: https://codereview.chromium.org/1475113004
Cr-Commit-Position: refs/heads/master@{#362161}
CrOS-Libchrome-Original-Commit: 8c4d270033fcce330ccb80350446125692c8e0c4
3 files changed