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

Unified Diff: ipc/file_descriptor_set_posix.cc

Issue 25325002: workaround for mac kernel bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor bugfix Created 7 years, 2 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 | « ipc/file_descriptor_set_posix.h ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/file_descriptor_set_posix.cc
diff --git a/ipc/file_descriptor_set_posix.cc b/ipc/file_descriptor_set_posix.cc
index 584efec14ae67612dba41c96ece8d14c8f1a6011..fc15c2dc5b8d5f3947c0e7cf640c2909c0aeffc5 100644
--- a/ipc/file_descriptor_set_posix.cc
+++ b/ipc/file_descriptor_set_posix.cc
@@ -126,6 +126,16 @@ void FileDescriptorSet::CommitAll() {
consumed_descriptor_highwater_ = 0;
}
+void FileDescriptorSet::ReleaseFDsToClose(std::vector<int>* fds) {
+ for (std::vector<base::FileDescriptor>::iterator
+ i = descriptors_.begin(); i != descriptors_.end(); ++i) {
+ if (i->auto_close)
+ fds->push_back(i->fd);
+ }
+ descriptors_.clear();
+ consumed_descriptor_highwater_ = 0;
+}
+
void FileDescriptorSet::SetDescriptors(const int* buffer, unsigned count) {
DCHECK(count <= kMaxDescriptorsPerMessage);
DCHECK_EQ(descriptors_.size(), 0u);
« no previous file with comments | « ipc/file_descriptor_set_posix.h ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698