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

Unified Diff: mojo/edk/system/ports/node.cc

Issue 2095873003: [mojo-edk] Process proxy disruptions locally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/edk/system/ports/ports_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ports/node.cc
diff --git a/mojo/edk/system/ports/node.cc b/mojo/edk/system/ports/node.cc
index 630a1a2680c26be0dba4a710ba18b2e9ae095071..128ecdf4ca7189821d45213b642264ee1b090567 100644
--- a/mojo/edk/system/ports/node.cc
+++ b/mojo/edk/system/ports/node.cc
@@ -1355,6 +1355,12 @@ void Node::DestroyAllPortsWithPeer(const NodeName& node_name,
event.proxy_to_port_name = kInvalidPortName;
delegate_->BroadcastMessage(NewInternalMessage(
kInvalidPortName, EventType::kObserveProxy, event));
+
+ // Also process death locally since the port that points this closed one
+ // could be on the current node.
+ // Note: Although this is recursive, only a single port is involved which
+ // limits the expected branching to 1.
+ DestroyAllPortsWithPeer(name_, proxy_name);
}
// Close any ports referenced by the closed proxies.
« no previous file with comments | « no previous file | mojo/edk/system/ports/ports_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698