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

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

Issue 2135113002: [mojo-edk] Close pending merges if the parent channel dies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert stuff for merge. Created 4 years, 5 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/system/node_channel.cc ('k') | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_controller.h
diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h
index c96b4f4405abfbffc79c0f666699b9b9e601c91e..df232a8d617d495cfb052ac294e03a8d1ff2ad87 100644
--- a/mojo/edk/system/node_controller.h
+++ b/mojo/edk/system/node_controller.h
@@ -153,7 +153,7 @@ class NodeController : public ports::NodeDelegate,
void AddPeer(const ports::NodeName& name,
scoped_refptr<NodeChannel> channel,
bool start_channel);
- void DropPeer(const ports::NodeName& name);
+ void DropPeer(const ports::NodeName& name, NodeChannel* channel);
void SendPeerMessage(const ports::NodeName& name,
ports::ScopedMessage message);
void AcceptIncomingMessages();
@@ -206,7 +206,8 @@ class NodeController : public ports::NodeDelegate,
const ports::NodeName& source_node,
Channel::MessagePtr message) override;
#endif
- void OnChannelError(const ports::NodeName& from_node) override;
+ void OnChannelError(const ports::NodeName& from_node,
+ NodeChannel* channel) override;
#if defined(OS_MACOSX) && !defined(OS_IOS)
MachPortRelay* GetMachPortRelay() override;
#endif
@@ -246,12 +247,16 @@ class NodeController : public ports::NodeDelegate,
// have one yet :(
std::unordered_map<ports::NodeName, std::string> pending_child_tokens_;
- // Guards |pending_port_merges_|.
+ // Guards |pending_port_merges_| and |reject_pending_merges_|.
base::Lock pending_port_merges_lock_;
// A set of port merge requests awaiting parent connection.
std::vector<std::pair<std::string, ports::PortRef>> pending_port_merges_;
+ // Indicates that new merge requests should be rejected because the parent has
+ // disconnected.
+ bool reject_pending_merges_ = false;
+
// Guards |parent_name_| and |bootstrap_parent_channel_|.
base::Lock parent_lock_;
« no previous file with comments | « mojo/edk/system/node_channel.cc ('k') | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698