Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: ipc/attachment_broker_privileged_mac.cc

Issue 1739203004: Add support for Attachment Brokering of IPC::Channels on multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/attachment_broker_privileged.cc ('k') | ipc/attachment_broker_privileged_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker_privileged_mac.cc
diff --git a/ipc/attachment_broker_privileged_mac.cc b/ipc/attachment_broker_privileged_mac.cc
index 6b53ce0f2be276dcdac1012921078f7c8a3fc43b..fdf4715b348e00695af90e121426210156851568 100644
--- a/ipc/attachment_broker_privileged_mac.cc
+++ b/ipc/attachment_broker_privileged_mac.cc
@@ -174,8 +174,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.
@@ -186,7 +187,8 @@ bool AttachmentBrokerPrivilegedMac::RouteWireFormatToAnother(
}
LogError(DESTINATION_FOUND);
- sender->Send(new AttachmentBrokerMsg_MachPortHasBeenDuplicated(wire_format));
+ SendMessageToEndpoint(
+ pair, new AttachmentBrokerMsg_MachPortHasBeenDuplicated(wire_format));
return true;
}
@@ -229,7 +231,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);
@@ -319,7 +323,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;
« no previous file with comments | « ipc/attachment_broker_privileged.cc ('k') | ipc/attachment_broker_privileged_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698