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

Unified Diff: mojo/edk/system/data_pipe_producer_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 | « mojo/edk/system/data_pipe_consumer_dispatcher.cc ('k') | mojo/edk/system/message_pipe_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_producer_dispatcher.cc
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.cc b/mojo/edk/system/data_pipe_producer_dispatcher.cc
index 27113eb945ad90da9a7509d7354a1b032d8f9860..9a8163a8e7cd703722f6052c757250e1e3f06e9f 100644
--- a/mojo/edk/system/data_pipe_producer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_producer_dispatcher.cc
@@ -86,8 +86,11 @@ DataPipeProducerDispatcher::DataPipeProducerDispatcher(
}
DataPipeProducerDispatcher::~DataPipeProducerDispatcher() {
- // |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 DataPipeProducerDispatcher::CancelAllAwakablesNoLock() {
« no previous file with comments | « mojo/edk/system/data_pipe_consumer_dispatcher.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698