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

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

Issue 1526563004: Fix shutdown assert with the new Mojo EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years 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/routed_raw_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_dispatcher.cc
diff --git a/mojo/edk/system/message_pipe_dispatcher.cc b/mojo/edk/system/message_pipe_dispatcher.cc
index b4938fe797feba1e3b008262521dd05648370948..beb182428957c84d07ca0fe9f31d77eaff952c53 100644
--- a/mojo/edk/system/message_pipe_dispatcher.cc
+++ b/mojo/edk/system/message_pipe_dispatcher.cc
@@ -618,7 +618,7 @@ MojoResult MessagePipeDispatcher::ReadMessageImplNoLock(
uint32_t* num_dispatchers,
MojoReadMessageFlags flags) {
lock().AssertAcquired();
- if (channel_) {
+ if (transferable_ && channel_) {
channel_->EnsureLazyInitialized();
} else if (!transferable_) {
if (non_transferable_state_ == WAITING_FOR_READ_OR_WRITE) {
@@ -718,7 +718,7 @@ MojoResult MessagePipeDispatcher::AddAwakableImplNoLock(
uintptr_t context,
HandleSignalsState* signals_state) {
lock().AssertAcquired();
- if (channel_) {
+ if (transferable_ && channel_) {
channel_->EnsureLazyInitialized();
} else if (!transferable_ &&
non_transferable_state_ == WAITING_FOR_READ_OR_WRITE) {
« no previous file with comments | « no previous file | mojo/edk/system/routed_raw_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698