summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.cc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-10-07 13:51:55 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-07 20:52:59 +0000
commit3722a32d89d1fa27b7510d82d14e94f0ea68aa9a (patch)
tree910333e192c721a279819064bd9349a788f08204 /ipc/ipc_channel_posix.cc
parent4b0739defcac390878c6a692a387be2b3fb65e29 (diff)
downloadchromium_src-3722a32d89d1fa27b7510d82d14e94f0ea68aa9a.zip
chromium_src-3722a32d89d1fa27b7510d82d14e94f0ea68aa9a.tar.gz
chromium_src-3722a32d89d1fa27b7510d82d14e94f0ea68aa9a.tar.bz2
ipc: Update MachPortMac ownership semantics.
This CL consists of a small refactor, a small change in ownership semantics, and a lot of documentation. The refactor removes a |const| qualifier from brokerable message attachments that are passed to the attachment broker. This allows for an improvement to ownership semantics for MachPortMac. BUG=535711 Review URL: https://codereview.chromium.org/1385143002 Cr-Commit-Position: refs/heads/master@{#352938}
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r--ipc/ipc_channel_posix.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index b9ab794..abe2f98 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -697,8 +697,8 @@ bool ChannelPosix::ProcessMessageForDelivery(Message* message) {
if (message->HasBrokerableAttachments()) {
DCHECK(GetAttachmentBroker());
DCHECK(peer_pid_ != base::kNullProcessId);
- for (const BrokerableAttachment* attachment :
- message->attachment_set()->PeekBrokerableAttachments()) {
+ for (BrokerableAttachment* attachment :
+ message->attachment_set()->GetBrokerableAttachments()) {
if (!GetAttachmentBroker()->SendAttachmentToProcess(attachment,
peer_pid_)) {
delete message;