diff options
author | rockot <rockot@chromium.org> | 2016-03-18 00:34:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 07:36:07 +0000 |
commit | 018a4e46c477ada7307ed5c7dad7eb58b7da75b5 (patch) | |
tree | ee6256be9c4d1ad1487be32ef60ce3a5011eab2f /mojo | |
parent | 38a2c07f47ed1007edeeff0c3699a694df938edb (diff) | |
download | chromium_src-018a4e46c477ada7307ed5c7dad7eb58b7da75b5.zip chromium_src-018a4e46c477ada7307ed5c7dad7eb58b7da75b5.tar.gz chromium_src-018a4e46c477ada7307ed5c7dad7eb58b7da75b5.tar.bz2 |
[mojo-edk] Stop using the sync broker on OS X
The sync broker is only needed for sandboxed shared
buffer allocation on POSIX, but it's not needed for
Mach shared buffers.
This stops using the broker on OS X.
BUG=591742,590979
Review URL: https://codereview.chromium.org/1809363002
Cr-Commit-Position: refs/heads/master@{#381908}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/edk/system/node_controller.cc | 5 | ||||
-rw-r--r-- | mojo/edk/system/node_controller.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/mojo/edk/system/node_controller.cc b/mojo/edk/system/node_controller.cc index 30b331f..698238d 100644 --- a/mojo/edk/system/node_controller.cc +++ b/mojo/edk/system/node_controller.cc @@ -140,7 +140,7 @@ void NodeController::ConnectToChild(base::ProcessHandle process_handle, void NodeController::ConnectToParent(ScopedPlatformHandle platform_handle) { // TODO(amistry): Consider the need for a broker on Windows. -#if defined(OS_POSIX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) // On posix, use the bootstrap channel for the broker and receive the node's // channel synchronously as the first message from the broker. broker_.reset(new Broker(std::move(platform_handle))); @@ -231,7 +231,6 @@ int NodeController::MergeLocalPorts(const ports::PortRef& port0, scoped_refptr<PlatformSharedBuffer> NodeController::CreateSharedBuffer( size_t num_bytes) { - // TODO(amistry): Fix sync broker and re-enable on OSX. #if defined(OS_POSIX) && !defined(OS_MACOSX) // Shared buffer creation failure is fatal, so always use the broker when we // have one. This does mean that a non-root process that has children will use @@ -258,7 +257,7 @@ void NodeController::ConnectToChildOnIOThread( ScopedPlatformHandle platform_handle) { DCHECK(io_task_runner_->RunsTasksOnCurrentThread()); -#if defined(OS_POSIX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) PlatformChannelPair node_channel; // BrokerHost owns itself. BrokerHost* broker_host = new BrokerHost(std::move(platform_handle)); diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h index 34c2644..c177f8f 100644 --- a/mojo/edk/system/node_controller.h +++ b/mojo/edk/system/node_controller.h @@ -266,8 +266,8 @@ class NodeController : public ports::NodeDelegate, // Must only be accessed from the IO thread. bool destroy_on_io_thread_shutdown_ = false; -#if defined(OS_POSIX) - // Broker for sync shared buffer creation (posix-only) in children. +#if defined(OS_POSIX) && !defined(OS_MACOSX) + // Broker for sync shared buffer creation (non-Mac posix-only) in children. scoped_ptr<Broker> broker_; #endif |