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

Unified Diff: mojo/public/cpp/bindings/lib/connector.cc

Issue 1557753002: Fix assumption in mojo binding class Connector that message pipes notice the other end's closing sy… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/connector.cc
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc
index c5e9b7fe12e5a8bc06db0cc2fc620fb677e53056..e6f2d83ab646d2795d6bb0199b1d7485a9254b38 100644
--- a/mojo/public/cpp/bindings/lib/connector.cc
+++ b/mojo/public/cpp/bindings/lib/connector.cc
@@ -264,7 +264,13 @@ void Connector::ReadAllAvailableMessages() {
return;
if (rv == MOJO_RESULT_SHOULD_WAIT) {
- WaitToReadMore();
+ // ReadSingleMessage could end up calling HandleError which resets
+ // message_pipe_ to a dummy one that is closed. The old EDK will see the
+ // that the peer is closed immediately, while the new one is asynchronous
+ // because of thread hops. In that case, there'll still be an async
+ // waiter.
+ if (!async_wait_id_)
+ WaitToReadMore();
break;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698