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

Unified Diff: mojo/system/local_message_pipe_endpoint.cc

Issue 240133005: Mojo: Make some attempts towards fixing remote message pipe closure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some locking issues Created 6 years, 8 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 | « mojo/system/local_message_pipe_endpoint.h ('k') | mojo/system/message_in_transit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/local_message_pipe_endpoint.cc
diff --git a/mojo/system/local_message_pipe_endpoint.cc b/mojo/system/local_message_pipe_endpoint.cc
index ece8e03190071f67e867f0ee01eee6ea106d5f40..b5b6bd022327b414e07f0c81cc4e05c181b3c9ea 100644
--- a/mojo/system/local_message_pipe_endpoint.cc
+++ b/mojo/system/local_message_pipe_endpoint.cc
@@ -27,13 +27,7 @@ MessagePipeEndpoint::Type LocalMessagePipeEndpoint::GetType() const {
return kTypeLocal;
}
-void LocalMessagePipeEndpoint::Close() {
- DCHECK(is_open_);
- is_open_ = false;
- message_queue_.Clear();
-}
-
-void LocalMessagePipeEndpoint::OnPeerClose() {
+bool LocalMessagePipeEndpoint::OnPeerClose() {
DCHECK(is_open_);
DCHECK(is_peer_open_);
@@ -48,6 +42,8 @@ void LocalMessagePipeEndpoint::OnPeerClose() {
waiter_list_.AwakeWaitersForStateChange(new_satisfied_flags,
new_satisfiable_flags);
}
+
+ return true;
}
void LocalMessagePipeEndpoint::EnqueueMessage(
@@ -63,6 +59,12 @@ void LocalMessagePipeEndpoint::EnqueueMessage(
}
}
+void LocalMessagePipeEndpoint::Close() {
+ DCHECK(is_open_);
+ is_open_ = false;
+ message_queue_.Clear();
+}
+
void LocalMessagePipeEndpoint::CancelAllWaiters() {
DCHECK(is_open_);
waiter_list_.CancelAllWaiters();
« no previous file with comments | « mojo/system/local_message_pipe_endpoint.h ('k') | mojo/system/message_in_transit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698