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

Unified Diff: content/renderer/renderer_main_platform_delegate_mac.mm

Issue 545603002: [Mac] Shut down connections to WindowServer before engaging the sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698