summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-11-30 15:15:11 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-30 23:15:55 +0000
commitc0740f6a639ba3d8a80b4e293f2f777479e5e26c (patch)
treeed5fc9112cf03445b88503efeab4920f9c45e155 /ipc
parent9c4ffd1ed48825cf583dea349f64c7d0ebe9e0a5 (diff)
downloadchromium_src-c0740f6a639ba3d8a80b4e293f2f777479e5e26c.zip
chromium_src-c0740f6a639ba3d8a80b4e293f2f777479e5e26c.tar.gz
chromium_src-c0740f6a639ba3d8a80b4e293f2f777479e5e26c.tar.bz2
ipc: Add a comment to AttachmentBrokerUnprivilegedMac.
The comment indicates that a particular code path should not be hit if everything is working correctly. BUG=561105 Review URL: https://codereview.chromium.org/1484063002 Cr-Commit-Position: refs/heads/master@{#362260}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/attachment_broker_unprivileged_mac.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/attachment_broker_unprivileged_mac.cc b/ipc/attachment_broker_unprivileged_mac.cc
index 31c4fc8..4e76688 100644
--- a/ipc/attachment_broker_unprivileged_mac.cc
+++ b/ipc/attachment_broker_unprivileged_mac.cc
@@ -85,6 +85,8 @@ void AttachmentBrokerUnprivilegedMac::OnMachPortHasBeenDuplicated(
const IPC::internal::MachPortAttachmentMac::WireFormat& wire_format) {
// The IPC message was intended for a different process. Ignore it.
if (wire_format.destination_process != base::Process::Current().Pid()) {
+ // If everything is functioning correctly, this path should not be taken.
+ // However, it's still important to validate all fields of the IPC message.
LogError(WRONG_DESTINATION);
return;
}