| Index: ipc/attachment_broker_privileged_mac.cc
|
| diff --git a/ipc/attachment_broker_privileged_mac.cc b/ipc/attachment_broker_privileged_mac.cc
|
| index c5bed27c68df42db1a48998bdfb970da606c35bb..f900f1c229e075d27dd18deeb7184041c4308afa 100644
|
| --- a/ipc/attachment_broker_privileged_mac.cc
|
| +++ b/ipc/attachment_broker_privileged_mac.cc
|
| @@ -214,8 +214,9 @@ bool AttachmentBrokerPrivilegedMac::RouteWireFormatToAnother(
|
| // Another process is the destination.
|
| base::ProcessId dest = wire_format.destination_process;
|
| base::AutoLock auto_lock(*get_lock());
|
| - Sender* sender = GetSenderWithProcessId(dest);
|
| - if (!sender) {
|
| + AttachmentBrokerPrivileged::EndpointRunnerPair pair =
|
| + GetSenderWithProcessId(dest);
|
| + if (!pair.first) {
|
| // Assuming that this message was not sent from a malicious process, the
|
| // channel endpoint that would have received this message will block
|
| // forever.
|
| @@ -226,7 +227,8 @@ bool AttachmentBrokerPrivilegedMac::RouteWireFormatToAnother(
|
| }
|
|
|
| LogError(DESTINATION_FOUND);
|
| - sender->Send(new AttachmentBrokerMsg_MachPortHasBeenDuplicated(wire_format));
|
| + SendMessageToEndpoint(
|
| + pair, new AttachmentBrokerMsg_MachPortHasBeenDuplicated(wire_format));
|
| return true;
|
| }
|
|
|
| @@ -324,7 +326,9 @@ void AttachmentBrokerPrivilegedMac::SendPrecursorsForProcess(
|
|
|
| if (!to_self) {
|
| base::AutoLock auto_lock(*get_lock());
|
| - if (!GetSenderWithProcessId(pid)) {
|
| + AttachmentBrokerPrivileged::EndpointRunnerPair pair =
|
| + GetSenderWithProcessId(pid);
|
| + if (!pair.first) {
|
| // If there is no sender, then the destination process is no longer
|
| // running, or never existed to begin with.
|
| LogError(DESTINATION_NOT_FOUND);
|
| @@ -394,7 +398,9 @@ void AttachmentBrokerPrivilegedMac::ProcessExtractorsForProcess(
|
|
|
| {
|
| base::AutoLock auto_lock(*get_lock());
|
| - if (!GetSenderWithProcessId(pid)) {
|
| + AttachmentBrokerPrivileged::EndpointRunnerPair pair =
|
| + GetSenderWithProcessId(pid);
|
| + if (!pair.first) {
|
| // If there is no sender, then the source process is no longer running.
|
| LogError(ERROR_SOURCE_NOT_FOUND);
|
| delete it->second;
|
|
|