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
tree: efcab13bf41956db726f744307838efad8fc428d
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/