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

Unified Diff: mojo/system/message_pipe.cc

Issue 587153003: Mojo: Move the paused message queue from ProxyMessagePipeEndpoint to ChannelEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_pmpe_attach
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/local_message_pipe_endpoint.h ('k') | mojo/system/proxy_message_pipe_endpoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe.cc
diff --git a/mojo/system/message_pipe.cc b/mojo/system/message_pipe.cc
index e2aabe37c176ee047610daa1305ac08f0fc9340a..f86a13449d9519d0e88cfd65ecd20c91d5a56102 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -170,14 +170,14 @@ scoped_refptr<ChannelEndpoint> MessagePipe::ConvertLocalToProxy(unsigned port) {
<< "Direct message pipe passing across multiple channels not yet "
"implemented; will proxy";
+ scoped_ptr<MessagePipeEndpoint> old_endpoint(endpoints_[port].Pass());
scoped_refptr<ChannelEndpoint> channel_endpoint(
new ChannelEndpoint(this, port));
- scoped_ptr<MessagePipeEndpoint> replacement_endpoint(
- new ProxyMessagePipeEndpoint(
- channel_endpoint.get(),
- static_cast<LocalMessagePipeEndpoint*>(endpoints_[port].get()),
- is_peer_open));
- endpoints_[port].swap(replacement_endpoint);
+ endpoints_[port].reset(
+ new ProxyMessagePipeEndpoint(channel_endpoint.get(), is_peer_open));
+ channel_endpoint->TakeMessages(static_cast<LocalMessagePipeEndpoint*>(
+ old_endpoint.get())->message_queue());
+ old_endpoint->Close();
return channel_endpoint;
}
« no previous file with comments | « mojo/system/local_message_pipe_endpoint.h ('k') | mojo/system/proxy_message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698