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

Side by Side Diff: mojo/edk/system/node_channel.h

Issue 2065453004: Always leak the Mojo parent pipe handle on child process shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/channel_win.cc ('k') | mojo/edk/system/node_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ 5 #ifndef MOJO_EDK_SYSTEM_NODE_CHANNEL_H_
6 #define MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ 6 #define MOJO_EDK_SYSTEM_NODE_CHANNEL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 static void GetPortsMessageData(Channel::Message* message, void** data, 95 static void GetPortsMessageData(Channel::Message* message, void** data,
96 size_t* num_data_bytes); 96 size_t* num_data_bytes);
97 97
98 // Start receiving messages. 98 // Start receiving messages.
99 void Start(); 99 void Start();
100 100
101 // Permanently stop the channel from sending or receiving messages. 101 // Permanently stop the channel from sending or receiving messages.
102 void ShutDown(); 102 void ShutDown();
103 103
104 // Leaks the pipe handle instead of closing it on shutdown.
105 void LeakHandleOnShutdown();
106
104 // Invokes the bad message callback for this channel, if any. 107 // Invokes the bad message callback for this channel, if any.
105 void NotifyBadMessage(const std::string& error); 108 void NotifyBadMessage(const std::string& error);
106 109
107 void SetRemoteProcessHandle(base::ProcessHandle process_handle); 110 void SetRemoteProcessHandle(base::ProcessHandle process_handle);
108 bool HasRemoteProcessHandle(); 111 bool HasRemoteProcessHandle();
109 // Note: The returned |ProcessHandle| is owned by the caller and should be 112 // Note: The returned |ProcessHandle| is owned by the caller and should be
110 // freed if necessary. 113 // freed if necessary.
111 base::ProcessHandle CopyRemoteProcessHandle(); 114 base::ProcessHandle CopyRemoteProcessHandle();
112 115
113 // Used for context in Delegate calls (via |from_node| arguments.) 116 // Used for context in Delegate calls (via |from_node| arguments.)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 PendingRelayMessageQueue pending_relay_messages_; 195 PendingRelayMessageQueue pending_relay_messages_;
193 #endif 196 #endif
194 197
195 DISALLOW_COPY_AND_ASSIGN(NodeChannel); 198 DISALLOW_COPY_AND_ASSIGN(NodeChannel);
196 }; 199 };
197 200
198 } // namespace edk 201 } // namespace edk
199 } // namespace mojo 202 } // namespace mojo
200 203
201 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ 204 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_win.cc ('k') | mojo/edk/system/node_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698