From 557d18c8a727056ad353deb9ef67d65aa3f6e9a2 Mon Sep 17 00:00:00 2001
From: Chris Martin <cmartin@mozilla.com>
Date: Wed, 26 Oct 2022 19:23:12 +0000
Subject: [PATCH] Bug 1347710 - Change sandbox.gpu to a static pref r=handyman

Differential Revision: https://phabricator.services.mozilla.com/D160277
---
 browser/app/profile/firefox.js           |  7 -------
 modules/libpref/init/StaticPrefList.yaml | 10 ++++++++++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index fd11f93153e2e..39efbcd1bf600 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1247,13 +1247,6 @@ pref("browser.bookmarks.editDialog.delayedApply.enabled", false);
   // See - security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
   // SetSecurityLevelForContentProcess() for what the different settings mean.
   pref("security.sandbox.content.level", 6);
-
-  // This controls the strength of the Windows GPU process sandbox.  Changes
-  // will require restart.
-  // For information on what the level number means, see
-  // SetSecurityLevelForGPUProcess() in
-  // security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
-  pref("security.sandbox.gpu.level", 0);
 #endif
 
 #if defined(XP_MACOSX) && defined(MOZ_SANDBOX)
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index 7c1a31124982d..41cb5c35d4574 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -12704,6 +12704,16 @@
   mirror: always
   do_not_use_directly: true # Consumers should use SandboxSettings to ask.
 
+# This controls the strength of the Windows GPU process sandbox.  Changes
+# will require restart.
+# For information on what the level number means, see
+# SetSecurityLevelForGPUProcess() in
+# security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
+- name: security.sandbox.gpu.level
+  type: int32_t
+  value: 0
+  mirror: always
+
 # Enrollment preferences for the win32k experiment, set and managed by Normandy
 - name: security.sandbox.content.win32k-experiment.enrollmentStatus
   type: uint32_t
-- 
GitLab