Commit 31af0c4e authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Don't broker shared memory allocation on Windows.

Bug: 1085007
Change-Id: I0cf4beaf1c10fabecb79eaa6d7a14d0b52eba6cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210486Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771086}
parent 4d0b848d
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
#include "content/public/common/service_names.mojom.h" #include "content/public/common/service_names.mojom.h"
#include "services/service_manager/embedder/switches.h" #include "services/service_manager/embedder/switches.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace content { namespace content {
ContentServiceManagerMainDelegate::ContentServiceManagerMainDelegate( ContentServiceManagerMainDelegate::ContentServiceManagerMainDelegate(
...@@ -70,6 +74,15 @@ void ContentServiceManagerMainDelegate::OverrideMojoConfiguration( ...@@ -70,6 +74,15 @@ void ContentServiceManagerMainDelegate::OverrideMojoConfiguration(
if (!base::CommandLine::ForCurrentProcess()->HasSwitch( if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kProcessType)) { switches::kProcessType)) {
config->is_broker_process = true; config->is_broker_process = true;
} else {
#if defined(OS_WIN)
if (base::win::GetVersion() >= base::win::Version::WIN8_1) {
// On Windows 8.1 and later it's not necessary to broker shared memory
// allocation, as even sandboxed processes can allocate their own without
// trouble.
config->force_direct_shared_memory_allocation = true;
}
#endif
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment