Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1679)

Unified Diff: mojo/edk/system/data_pipe_consumer_dispatcher.cc

Issue 1475113004: Fix shutdown assert in new Mojo EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_consumer_dispatcher.cc
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 0e73f9b36667fb28bd5d50b7412d10792ae65dfa..6f86663be988c1964ad5c18fb5593d676eb389e4 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -116,8 +116,11 @@ DataPipeConsumerDispatcher::DataPipeConsumerDispatcher(
}
DataPipeConsumerDispatcher::~DataPipeConsumerDispatcher() {
- // |Close()|/|CloseImplNoLock()| should have taken care of the channel.
- DCHECK(!channel_);
+ // See comment in ~MessagePipeDispatcher.
+ if (channel_ && internal::g_io_thread_task_runner->RunsTasksOnCurrentThread())
+ channel_->Shutdown();
+ else
+ DCHECK(!channel_);
}
void DataPipeConsumerDispatcher::CancelAllAwakablesNoLock() {
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698