Commit a6029026 authored by rsesek's avatar rsesek Committed by Commit bot

[Mac] Shut down connections to WindowServer before engaging the sandbox.

The connection is only needed during sandbox warmup to initialize the default
color space. It was formerly needed by scrollbar NSAnimations, but that was
replaced via https://codereview.chromium.org/529103002/.

BUG=397642,306348
TEST=Manually tested on 10.6-10.10.
R=avi@chromium.org

Review URL: https://codereview.chromium.org/545603002

Cr-Commit-Position: refs/heads/master@{#293546}
parent 27548ef8
......@@ -18,6 +18,11 @@
#include "content/public/common/content_switches.h"
#include "content/common/sandbox_init_mac.h"
extern "C" {
void CGSSetDenyWindowServerConnections(bool);
void CGSShutdownServerConnections();
};
namespace content {
namespace {
......@@ -136,6 +141,12 @@ void RendererMainPlatformDelegate::PlatformUninitialize() {
}
bool RendererMainPlatformDelegate::EnableSandbox() {
// Disconnect from WindowServer before entering the sandbox, after all
// objects have been warmed up. Shutting down the connection requires
// connecting to WindowServer, so do this before engaging the sandbox.
CGSSetDenyWindowServerConnections(true);
CGSShutdownServerConnections();
// Enable the sandbox.
bool sandbox_initialized = InitializeSandbox();
......
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