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

Unified Diff: mojo/system/message_pipe.cc

Issue 566783002: Mojo: Remove DCHECK disallowing passing of a remote message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | mojo/system/remote_message_pipe_unittest.cc » ('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 13776d3d76558f6261f90bd964c1ad3dfa6190d4..70ef246113a0ec138b39024b6dd048876ec2441f 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -155,12 +155,15 @@ void MessagePipe::ConvertLocalToProxy(unsigned port) {
bool is_peer_open = !!endpoints_[GetPeerPort(port)];
- // TODO(vtl): Hopefully this will work if the peer has been closed and when
- // the peer is local. If the peer is remote, we should do something more
- // sophisticated.
- DCHECK(!is_peer_open ||
- endpoints_[GetPeerPort(port)]->GetType() ==
- MessagePipeEndpoint::kTypeLocal);
+ // TODO(vtl): Allowing this case is a temporary hack. It'll set up a
+ // |MessagePipe| with two proxy endpoints, which will then act as a proxy
+ // (rather than trying to connect the two ends directly).
+ DLOG_IF(WARNING,
+ is_peer_open &&
+ endpoints_[GetPeerPort(port)]->GetType() !=
+ MessagePipeEndpoint::kTypeLocal)
+ << "Direct message pipe passing across multiple channels not yet "
+ "implemented; will proxy";
scoped_ptr<MessagePipeEndpoint> replacement_endpoint(
new ProxyMessagePipeEndpoint(
« no previous file with comments | « no previous file | mojo/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698