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

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

Issue 2295063002: Use ChannelMojo between app shims and the browser process. (Closed)
Patch Set: Created 4 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/edk/embedder/platform_channel_utils_posix.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_controller.cc
diff --git a/mojo/edk/system/node_controller.cc b/mojo/edk/system/node_controller.cc
index 253af8763d1dee55ad30de36c095fe095ec2fa90..072d92b10391fd0abb112e38e8121577ee3031ca 100644
--- a/mojo/edk/system/node_controller.cc
+++ b/mojo/edk/system/node_controller.cc
@@ -1269,9 +1269,13 @@ void NodeController::OnAcceptPeer(const ports::NodeName& from_node,
pending_peers_.erase(it);
DCHECK(channel);
- DVLOG(1) << "Node " << name_ << " accepted peer " << peer_name;
+ // If the peer connection is a self connection (which is used in tests),
+ // drop the channel to it and skip straight to merging the ports.
+ if (name_ != peer_name) {
+ DVLOG(1) << "Node " << name_ << " accepted peer " << peer_name;
- AddPeer(peer_name, channel, false /* start_channel */);
+ AddPeer(peer_name, channel, false /* start_channel */);
+ }
// We need to choose one side to initiate the port merge. It doesn't matter
// who does it as long as they don't both try. Simple solution: pick the one
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils_posix.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698