Index: content/renderer/renderer_main_platform_delegate_mac.mm |
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm |
index 98b0aa4d84a35b6ba10776155d93340923f2707f..4e36f81b65c80e1f6e55fe868e00b9cdc552cc52 100644 |
--- a/content/renderer/renderer_main_platform_delegate_mac.mm |
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm |
@@ -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. |
Avi (use Gerrit)
2014/09/04 20:10:54
"It's like having to connect to the WindowServer t
|
+ CGSSetDenyWindowServerConnections(true); |
+ CGSShutdownServerConnections(); |
+ |
// Enable the sandbox. |
bool sandbox_initialized = InitializeSandbox(); |