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); |