diff options
author | jam <jam@chromium.org> | 2015-12-15 10:08:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-15 18:10:13 +0000 |
commit | e79cef79b4940c640e8d575df35e57e397f3d7f0 (patch) | |
tree | ef27b52da0a97d9e3fec5e5429ebeadd1b4475c7 /mojo | |
parent | dc1a54706c3b0d71f528ae4803d8f15f8ebdce17 (diff) | |
download | chromium_src-e79cef79b4940c640e8d575df35e57e397f3d7f0.zip chromium_src-e79cef79b4940c640e8d575df35e57e397f3d7f0.tar.gz chromium_src-e79cef79b4940c640e8d575df35e57e397f3d7f0.tar.bz2 |
Followup fix to r365175 for new Mojo EDK.
We need to ensure the channel is shutdown before RoutedRawChannel destructs.
BUG=561803
Review URL: https://codereview.chromium.org/1526093002
Cr-Commit-Position: refs/heads/master@{#365286}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/edk/system/routed_raw_channel.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/edk/system/routed_raw_channel.cc b/mojo/edk/system/routed_raw_channel.cc index b985f56..cd57693 100644 --- a/mojo/edk/system/routed_raw_channel.cc +++ b/mojo/edk/system/routed_raw_channel.cc @@ -85,6 +85,7 @@ void RoutedRawChannel::RemoveRoute(uint64_t route_id) { } RoutedRawChannel::~RoutedRawChannel() { + DCHECK(!channel_); destruct_callback_.Run(this); } @@ -134,7 +135,7 @@ void RoutedRawChannel::OnError(Error error) { // This needs to match non-multiplexed MessagePipeDispatcher's destruction of // the channel only when read errors occur. - if (error != ERROR_WRITE) { + if (error != ERROR_WRITE || routes_.empty()) { channel_->Shutdown(); channel_ = nullptr; } |