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

Unified Diff: ipc/ipc_mojo_bootstrap.cc

Issue 2656573004: ChannelAssociatedGroupController: expect that endpoints may not be in closed state during destructi… (Closed)
Patch Set: Created 3 years, 11 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: ipc/ipc_mojo_bootstrap.cc
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index 256f394ec0a8281f7d556fe75a936e6a88d8c7f3..7489ded330c6d957c56d713730708de91dc81768 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -484,8 +484,17 @@ class ChannelAssociatedGroupController
Endpoint* endpoint = iter->second.get();
++iter;
- DCHECK(endpoint->closed());
- MarkPeerClosedAndMaybeRemove(endpoint);
+ if (!endpoint->closed()) {
+ // This happens when a NotifyPeerEndpointClosed message been received,
+ // but (1) the interface ID hasn't been used to create local endpoint
+ // handle; and (2) a NotifyEndpointClosedBeforeSent hasn't been
+ // received.
+ DCHECK(!endpoint->client());
+ DCHECK(endpoint->peer_closed());
+ MarkClosedAndMaybeRemove(endpoint);
+ } else {
+ MarkPeerClosedAndMaybeRemove(endpoint);
+ }
}
DCHECK(endpoints_.empty());
« 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