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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 585093002: Mojo: Make MessagePipe::ConvertLocalToProxy() create the ChannelEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_attachmpe
Patch Set: rebased Created 6 years, 3 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/message_pipe.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher.cc
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc
index c515a00067f8c551b80f906ffa26610f7cfd30bb..85c0d38b6cfc92f871fa05e7c4d83f134a326f07 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -247,12 +247,10 @@ bool MessagePipeDispatcher::EndSerializeAndCloseImplNoLock(
embedder::PlatformHandleVector* /*platform_handles*/) {
DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
- // Convert the local endpoint to a proxy endpoint (moving the message queue).
- message_pipe_->ConvertLocalToProxy(port_);
-
- // Attach the new proxy endpoint to the channel.
- MessageInTransit::EndpointId endpoint_id = channel->AttachEndpoint(
- make_scoped_refptr(new ChannelEndpoint(message_pipe_.get(), port_)));
+ // Convert the local endpoint to a proxy endpoint (moving the message queue)
+ // and attach it to the channel.
+ MessageInTransit::EndpointId endpoint_id =
+ channel->AttachEndpoint(message_pipe_->ConvertLocalToProxy(port_));
// Note: It's okay to get an endpoint ID of |kInvalidEndpointId|. (It's
// possible that the other endpoint -- the one that we're not sending -- was
// closed in the intervening time.) In that case, we need to deserialize a
« no previous file with comments | « mojo/system/message_pipe.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698