Bug 1357486: Enable OOP extensions by default on Windows. r=aswan
MozReview-Commit-ID: 3Tet7tNtmGx
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -79,16 +79,20 @@ pref("extensions.geckoProfiler.getSymbol
pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,remoteBreakpad");
#endif
// Add-on content security policies.
pref("extensions.webextensions.base-content-security-policy", "script-src 'self' https://* moz-extension: blob: filesystem: 'unsafe-eval' 'unsafe-inline'; object-src 'self' https://* moz-extension: blob: filesystem:;");
pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';");
+#ifdef XP_WIN
+pref("extensions.webextensions.remote", true);
+#endif
+
// Extensions that should not be flagged as legacy in about:addons
pref("extensions.legacy.exceptions", "{972ce4c6-7e08-4474-a285-3208198ce6fd},testpilot@cliqz.com,@testpilot-containers,jid1-NeEaf3sAHdKHPA@jetpack,@activity-streams,pulse@mozilla.com,@testpilot-addon,@min-vid,tabcentertest1@mozilla.com,snoozetabs@mozilla.com,speaktome@mozilla.com,hoverpad@mozilla.com");
// Require signed add-ons by default
pref("xpinstall.signatures.required", true);
pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing");
// Dictionary download preference
--- a/browser/components/extensions/test/browser/head.js
+++ b/browser/components/extensions/test/browser/head.js
@@ -33,21 +33,21 @@ PromiseTestUtils.whitelistRejectionsGlob
const {AppConstants} = Cu.import("resource://gre/modules/AppConstants.jsm", {});
const {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm", {});
// We run tests under two different configurations, from browser.ini and
// browser-remote.ini. When running from browser-remote.ini, the tests are
// copied to the sub-directory "test-oop-extensions", which we detect here, and
// use to select our configuration.
-if (gTestPath.includes("test-oop-extensions")) {
- SpecialPowers.pushPrefEnv({set: [
- ["extensions.webextensions.remote", true],
- ["layers.popups.compositing.enabled", true],
- ]});
+let remote = gTestPath.includes("test-oop-extensions");
+SpecialPowers.pushPrefEnv({set: [
+ ["extensions.webextensions.remote", remote],
+]});
+if (remote) {
// We don't want to reset this at the end of the test, so that we don't have
// to spawn a new extension child process for each test unit.
SpecialPowers.setIntPref("dom.ipc.keepProcessesAlive.extension", 1);
}
// Bug 1239884: Our tests occasionally hit a long GC pause at unpredictable
// times in debug builds, which results in intermittent timeouts. Until we have
// a better solution, we force a GC after certain strategic tests, which tend to
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -740,20 +740,16 @@ this.Extension = class extends Extension
StartupCache.clearAddonData(addonData.id);
}
this.remote = useRemoteWebExtensions;
if (this.remote && processCount !== 1) {
throw new Error("Out-of-process WebExtensions are not supported with multiple child processes");
}
- if (this.remote && !Services.prefs.getBoolPref("layers.popups.compositing.enabled", false)) {
- Cu.reportError(new Error("Remote extensions should not be enabled without also setting " +
- "the layers.popups.compositing.enabled preference to true"));
- }
// This is filled in the first time an extension child is created.
this.parentMessageManager = null;
this.id = addonData.id;
this.version = addonData.version;
this.baseURI = NetUtil.newURI(this.getURL("")).QueryInterface(Ci.nsIURL);
this.principal = this.createPrincipal();
--- a/toolkit/components/extensions/test/mochitest/head.js
+++ b/toolkit/components/extensions/test/mochitest/head.js
@@ -3,21 +3,21 @@
/* exported AppConstants, Assert */
var {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
// We run tests under two different configurations, from mochitest.ini and
// mochitest-remote.ini. When running from mochitest-remote.ini, the tests are
// copied to the sub-directory "test-oop-extensions", which we detect here, and
// use to select our configuration.
-if (location.pathname.includes("test-oop-extensions")) {
- SpecialPowers.pushPrefEnv({set: [
- ["extensions.webextensions.remote", true],
- ["layers.popups.compositing.enabled", true],
- ]});
+let remote = location.pathname.includes("test-oop-extensions");
+SpecialPowers.pushPrefEnv({set: [
+ ["extensions.webextensions.remote", remote],
+]});
+if (remote) {
// We don't want to reset this at the end of the test, so that we don't have
// to spawn a new extension child process for each test unit.
SpecialPowers.setIntPref("dom.ipc.keepProcessesAlive.extension", 1);
}
{
let chromeScript = SpecialPowers.loadChromeScript(
SimpleTest.getTestFileURL("chrome_cleanup_script.js"));