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

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 878843002: Revert of Add ChannelPosix::ResetSafely() to deal with a lingering crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | ipc/ipc_channel_posix.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 IPC_IPC_CHANNEL_POSIX_H_ 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_
6 #define IPC_IPC_CHANNEL_POSIX_H_ 6 #define IPC_IPC_CHANNEL_POSIX_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 #include <sys/socket.h> // for CMSG macros 10 #include <sys/socket.h> // for CMSG macros
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 char input_cmsg_buf_[kMaxReadFDBuffer]; 195 char input_cmsg_buf_[kMaxReadFDBuffer];
196 196
197 // File descriptors extracted from messages coming off of the channel. The 197 // File descriptors extracted from messages coming off of the channel. The
198 // handles may span messages and come off different channels from the message 198 // handles may span messages and come off different channels from the message
199 // data (in the case of READWRITE), and are processed in FIFO here. 199 // data (in the case of READWRITE), and are processed in FIFO here.
200 // NOTE: The implementation assumes underlying storage here is contiguous, so 200 // NOTE: The implementation assumes underlying storage here is contiguous, so
201 // don't change to something like std::deque<> without changing the 201 // don't change to something like std::deque<> without changing the
202 // implementation! 202 // implementation!
203 std::vector<int> input_fds_; 203 std::vector<int> input_fds_;
204 204
205
206 void ResetSafely(base::ScopedFD* fd);
207 bool in_dtor_;
208
209 #if defined(OS_MACOSX) 205 #if defined(OS_MACOSX)
210 // On OSX, sent FDs must not be closed until we get an ack. 206 // On OSX, sent FDs must not be closed until we get an ack.
211 // Keep track of sent FDs here to make sure the remote is not 207 // Keep track of sent FDs here to make sure the remote is not
212 // trying to bamboozle us. 208 // trying to bamboozle us.
213 std::set<int> fds_to_close_; 209 std::set<int> fds_to_close_;
214 #endif 210 #endif
215 211
216 // True if we are responsible for unlinking the unix domain socket file. 212 // True if we are responsible for unlinking the unix domain socket file.
217 bool must_unlink_; 213 bool must_unlink_;
218 214
219 #if defined(OS_LINUX) 215 #if defined(OS_LINUX)
220 // If non-zero, overrides the process ID sent in the hello message. 216 // If non-zero, overrides the process ID sent in the hello message.
221 static int global_pid_; 217 static int global_pid_;
222 #endif // OS_LINUX 218 #endif // OS_LINUX
223 219
224 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); 220 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix);
225 }; 221 };
226 222
227 } // namespace IPC 223 } // namespace IPC
228 224
229 #endif // IPC_IPC_CHANNEL_POSIX_H_ 225 #endif // IPC_IPC_CHANNEL_POSIX_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698