summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_nacl.cc
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2014-09-24 13:11:45 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-24 20:11:59 +0000
commit96693856edc35a538f6ea8f0bd6ab55c75e3e823 (patch)
tree33bf28816211d8c3a5039db1d2f3a1ac74adf59e /ipc/ipc_channel_nacl.cc
parent33169d9f2497a79fdde3ae51c5aa7266032526c7 (diff)
downloadchromium_src-96693856edc35a538f6ea8f0bd6ab55c75e3e823.zip
chromium_src-96693856edc35a538f6ea8f0bd6ab55c75e3e823.tar.gz
chromium_src-96693856edc35a538f6ea8f0bd6ab55c75e3e823.tar.bz2
IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Message
This is a step toward to killing FileDescriptor. This change lets FiileDescriptorSet have both Files (for owning fds) and PlatformFiles (for non-owning fds). Doing this, we no longer need FileDescriptor which provides |auto_close| flag. BUG=415294 TEST=ipc_tests, ipc_mojo_unittests R=agl@chromium.org, jam@hcromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/583473002 Cr-Commit-Position: refs/heads/master@{#296498}
Diffstat (limited to 'ipc/ipc_channel_nacl.cc')
-rw-r--r--ipc/ipc_channel_nacl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
index 704f7d8..408e016 100644
--- a/ipc/ipc_channel_nacl.cc
+++ b/ipc/ipc_channel_nacl.cc
@@ -283,7 +283,7 @@ bool ChannelNacl::ProcessOutgoingMessages() {
int fds[FileDescriptorSet::kMaxDescriptorsPerMessage];
const size_t num_fds = msg->file_descriptor_set()->size();
DCHECK(num_fds <= FileDescriptorSet::kMaxDescriptorsPerMessage);
- msg->file_descriptor_set()->GetDescriptors(fds);
+ msg->file_descriptor_set()->PeekDescriptors(fds);
NaClAbiNaClImcMsgIoVec iov = {
const_cast<void*>(msg->data()), msg->size()
@@ -357,8 +357,8 @@ bool ChannelNacl::WillDispatchInputMessage(Message* msg) {
// The shenaniganery below with &foo.front() requires input_fds_ to have
// contiguous underlying storage (such as a simple array or a std::vector).
// This is why the header warns not to make input_fds_ a deque<>.
- msg->file_descriptor_set()->SetDescriptors(&input_fds_.front(),
- header_fds);
+ msg->file_descriptor_set()->AddDescriptorsToOwn(&input_fds_.front(),
+ header_fds);
input_fds_.clear();
return true;
}