Fix shutdown UAF in MessagePipeDispatcher in new Mojo EDK.

The problem was that the PostTask to the IO thread might not run if the IO thread has shutdown. In that case the MessagePipeDispatcher would get destructed, and RawChannel (called by IO thread destruction) can call its OnError method. Fix this by manually refcounting so that in this situation we just leak the MessagePipeDispatcher instead.

BUG=561803

Review URL: https://codereview.chromium.org/1539573002

Cr-Commit-Position: refs/heads/master@{#365881}


CrOS-Libchrome-Original-Commit: d0a0ab7efa8f9e7eb2124468070e79c2786113a8
1 file changed
tree: c4f6e793969fa51217ede3e4230cfb7008379923
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/