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

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

Issue 1558643002: Fix Mojo broker crash on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « mojo/edk/system/broker_state.cc ('k') | mojo/edk/system/child_broker_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/child_broker.cc
diff --git a/mojo/edk/system/child_broker.cc b/mojo/edk/system/child_broker.cc
index 6903c8204dbd23b393729c8e859407609dc983db..85d9e5241974ad4119e607bf3dbf7bafba747576 100644
--- a/mojo/edk/system/child_broker.cc
+++ b/mojo/edk/system/child_broker.cc
@@ -220,6 +220,17 @@ void ChildBroker::OnReadMessage(
CHECK(connected_pipes_.find(pipe) == connected_pipes_.end());
AttachMessagePipe(pipe, pipe_id, channels_[peer_pid]);
}
+ } else if (type == PEER_DIED) {
+ DCHECK(!platform_handles);
+ const PeerDiedMessage* message =
+ static_cast<const PeerDiedMessage*>(message_view.bytes());
+
+ uint64_t pipe_id = message->pipe_id;
+
+ CHECK(pending_connects_.find(pipe_id) != pending_connects_.end());
+ MessagePipeDispatcher* pipe = pending_connects_[pipe_id];
+ pending_connects_.erase(pipe_id);
+ pipe->OnError(ERROR_READ_SHUTDOWN);
} else {
NOTREACHED();
}
« no previous file with comments | « mojo/edk/system/broker_state.cc ('k') | mojo/edk/system/child_broker_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698