Fix shutdown assert with the new Mojo EDK.
This was seen on Windows tryjobs enabling the new EDK. The problem was that RoutedRawChannel was destroying the channel on write errors, while normally (without multiplexing) this is only done on read errors. So MessagePipeDispatcher thought it had a channel_ (which it didn't use because it knew it had seen a write error) and it was asserting at shutdown. The fix is to make RoutedRawChannel match non-multiplexed MessagePipeDispatcher's destruction of the channel only when read errors occur.
BUG=561803
Review URL: https://codereview.chromium.org/1526563004
Cr-Commit-Position: refs/heads/master@{#365175}
CrOS-Libchrome-Original-Commit: a0c8ebc44e574bf12e7ffca0d492b9859f914a4d
2 files changed