--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1552,36 +1552,25 @@ pref("browser.tabs.remote.warmup.unloadD
// For the about:tabcrashed page
pref("browser.tabs.crashReporting.sendReport", true);
pref("browser.tabs.crashReporting.includeURL", false);
pref("browser.tabs.crashReporting.requestEmail", false);
pref("browser.tabs.crashReporting.emailMe", false);
pref("browser.tabs.crashReporting.email", "");
-// But don't allow non-MPC extensions by default on Nightly
-#if defined(NIGHTLY_BUILD)
-pref("extensions.allow-non-mpc-extensions", false);
-#endif
-
pref("extensions.legacy.enabled", false);
// How often to check for CPOW timeouts. CPOWs are only timed out by
// the hang monitor.
pref("dom.ipc.cpow.timeout", 500);
// Causes access on unsafe CPOWs from browser code to throw by default.
pref("dom.ipc.cpows.forbid-unsafe-from-browser", true);
-// Don't allow add-ons marked as multiprocessCompatible to use CPOWs.
-pref("dom.ipc.cpows.forbid-cpows-in-compat-addons", true);
-
-// ...except for these add-ons:
-pref("dom.ipc.cpows.allow-cpows-in-compat-addons", "{b9db16a4-6edc-47ec-a1f4-b86292ed211d},firegestures@xuldev.org,{DDC359D1-844A-42a7-9AA1-88A850A938A8},privateTab@infocatcher,mousegesturessuite@lemon_juice.addons.mozilla.org,treestyletab@piro.sakura.ne.jp,cliqz@cliqz.com,{AE93811A-5C9A-4d34-8462-F7B864FC4696},contextsearch2@lwz.addons.mozilla.org,{EF522540-89F5-46b9-B6FE-1829E2B572C6},{677a8f98-fd64-40b0-a883-b8c95d0cbf17},images@wink.su,fx-devtools,url_advisor@kaspersky.com,{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d},{dc572301-7619-498c-a57d-39143191b318},dta@downthemall.net,{86095750-AD15-46d8-BF32-C0789F7E6A32},screenwise-prod@google.com,{91aa5abe-9de4-4347-b7b5-322c38dd9271},secureLogin@blueimp.net,ich@maltegoetz.de,come.back.block.image.from@cat-in-136.blogspot.com,{7b1bf0b6-a1b9-42b0-b75d-252036438bdc},s3crypto@data,{1e0fd655-5aea-4b4c-a583-f76ef1e3af9c},akahuku.fx.sp@toshiakisp.github.io,{aff87fa2-a58e-4edd-b852-0a20203c1e17},{1018e4d6-728f-4b20-ad56-37578a4de76b},rehostimage@engy.us,lazarus@interclue.com,{b2e69492-2358-071a-7056-24ad0c3defb1},flashstopper@byo.co.il,{e4a8a97b-f2ed-450b-b12d-ee082ba24781},jid1-f3mYMbCpz2AZYl@jetpack,{8c550e28-88c9-4764-bb52-aa489cf2efcd},{37fa1426-b82d-11db-8314-0800200c9a66},{ac2cfa60-bc96-11e0-962b-0800200c9a66},igetter@presenta.net,killspinners@byo.co.il,abhere2@moztw.org,{fc6339b8-9581-4fc7-b824-dffcb091fcb7},wampi@wink.su,backtrack@byalexv.co.uk,Gladiator_X@mail.ru,{73a6fe31-595d-460b-a920-fcc0f8843232},{46551EC9-40F0-4e47-8E18-8E5CF550CFB8},acewebextension_unlisted@acestream.org,@screen_maker,yasearch@yandex.ru,sp@avast.com,s3google@translator,igetterextension@presenta.net,{C1A2A613-35F1-4FCF-B27F-2840527B6556},screenwise-testing@google.com,helper-sig@savefrom.net,ImageSaver@Merci.chao,proxtube@abz.agency,wrc@avast.com,{9AA46F4F-4DC7-4c06-97AF-5035170634FE},jid1-CikLKKPVkw6ipw@jetpack,artur.dubovoy@gmail.com,nlgfeb@nlgfeb.ext,{A065A84F-95B6-433A-A0C8-4C040B77CE8A},fdm_ffext@freedownloadmanager.org");
-
// Enable e10s hang monitoring (slow script checking and plugin hang
// detection).
pref("dom.ipc.processHangMonitor", true);
#ifdef DEBUG
// Don't report hangs in DEBUG builds. They're too slow and often a
// debugger is attached.
pref("dom.ipc.reportProcessHangs", false);
--- a/layout/tools/reftest/reftest-preferences.js
+++ b/layout/tools/reftest/reftest-preferences.js
@@ -16,17 +16,16 @@ user_pref("dom.max_chrome_script_run_tim
user_pref("hangmonitor.timeout", 0);
// Ensure autoplay is enabled for all platforms.
user_pref("media.autoplay.enabled", true);
// Disable updates
user_pref("app.update.enabled", false);
user_pref("app.update.staging.enabled", false);
user_pref("app.update.url.android", "");
// Ensure we can load the reftest extension
-user_pref("extensions.allow-non-mpc-extensions", true);
user_pref("extensions.legacy.enabled", true);
user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
// Disable addon updates and prefetching so we don't leak them
user_pref("extensions.update.enabled", false);
user_pref("extensions.systemAddon.update.url", "http://localhost/dummy-system-addons.xml");
user_pref("extensions.getAddons.cache.enabled", false);
// Disable blocklist updates so we don't have them reported as leaks
user_pref("extensions.blocklist.enabled", false);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5105,17 +5105,16 @@ pref("browser.meta_refresh_when_inactive
// XPInstall prefs
pref("xpinstall.whitelist.required", true);
// Only Firefox requires add-on signatures
pref("xpinstall.signatures.required", false);
pref("extensions.langpacks.signatures.required", false);
pref("extensions.minCompatiblePlatformVersion", "2.0");
pref("extensions.webExtensionsMinPlatformVersion", "42.0a1");
pref("extensions.legacy.enabled", true);
-pref("extensions.allow-non-mpc-extensions", true);
// Other webextensions prefs
pref("extensions.webextensions.keepStorageOnUninstall", false);
pref("extensions.webextensions.keepUuidOnUninstall", false);
// Redirect basedomain used by identity api
pref("extensions.webextensions.identity.redirectDomain", "extensions.allizom.org");
pref("extensions.webextensions.restrictedDomains", "accounts-static.cdn.mozilla.net,accounts.firefox.com,addons.cdn.mozilla.net,addons.mozilla.org,api.accounts.firefox.com,content.cdn.mozilla.net,content.cdn.mozilla.net,discovery.addons.mozilla.org,input.mozilla.org,install.mozilla.org,oauth.accounts.firefox.com,profile.accounts.firefox.com,support.mozilla.org,sync.services.mozilla.com,testpilot.firefox.com");
// Whether or not webextension themes are supported.
--- a/testing/firefox-ui/tests/puppeteer/test_notifications.py
+++ b/testing/firefox-ui/tests/puppeteer/test_notifications.py
@@ -13,25 +13,23 @@ from marionette_harness import Marionett
class TestNotifications(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestNotifications, self).setUp()
self.marionette.set_pref('extensions.install.requireSecureOrigin', False)
- self.marionette.set_pref('extensions.allow-non-mpc-extensions', True)
self.addons_url = self.marionette.absolute_url('addons/extensions/')
self.puppeteer.utils.permissions.add(self.marionette.baseurl, 'install')
def tearDown(self):
try:
self.marionette.clear_pref('extensions.install.requireSecureOrigin')
- self.marionette.clear_pref('extensions.allow-non-mpc-extensions')
self.marionette.clear_pref('xpinstall.signatures.required')
self.puppeteer.utils.permissions.remove(self.addons_url, 'install')
if self.browser.notification:
self.browser.notification.close(force=True)
finally:
super(TestNotifications, self).tearDown()
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -88,17 +88,16 @@ user_pref("extensions.enabledScopes", 5)
user_pref("extensions.autoDisableScopes", 0);
// Disable metadata caching for installed add-ons by default
user_pref("extensions.getAddons.cache.enabled", false);
// Disable intalling any distribution add-ons
user_pref("extensions.installDistroAddons", false);
// XPI extensions are required for test harnesses to load
user_pref("extensions.defaultProviders.enabled", true);
user_pref("xpinstall.signatures.required", false);
-user_pref("extensions.allow-non-mpc-extensions", true);
user_pref("extensions.legacy.enabled", true);
user_pref("geo.wifi.uri", "http://%(server)s/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
user_pref("geo.wifi.timeToWaitBeforeSending", 2000);
user_pref("geo.wifi.scan", false);
user_pref("geo.wifi.logging.enabled", true);
// Prevent connection to the push server for tests.
--- a/testing/talos/talos/config.py
+++ b/testing/talos/talos/config.py
@@ -199,17 +199,16 @@ DEFAULTS = dict(
'devtools.debugger.remote-enabled': False,
'devtools.theme': "light",
'devtools.timeline.enabled': False,
'identity.fxaccounts.migrateToDevEdition': False,
'plugin.state.flash': 0,
'media.libavcodec.allow-obsolete': True,
'extensions.legacy.enabled': True,
'xpinstall.signatures.required': False,
- 'extensions.allow-non-mpc-extensions': True
}
)
# keys to generated self.config that are global overrides to tests
GLOBAL_OVERRIDES = (
'cycles',
'gecko_profile',
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -73,17 +73,16 @@ class TPSTestRunner(object):
'extensions.update.notifyUser': False,
'services.sync.firstSync': 'notReady',
'services.sync.lastversion': '1.0',
'toolkit.startup.max_resumed_crashes': -1,
# hrm - not sure what the release/beta channels will do?
'xpinstall.signatures.required': False,
'services.sync.testing.tps': True,
'engine.bookmarks.repair.enabled': False,
- 'extensions.allow-non-mpc-extensions': True,
'extensions.legacy.enabled': True,
}
debug_preferences = {
'services.sync.log.appender.console': 'Trace',
'services.sync.log.appender.dump': 'Trace',
'services.sync.log.appender.file.level': 'Trace',
'services.sync.log.appender.file.logOnSuccess': True,
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -212,17 +212,16 @@ const DEFAULT_ENVIRONMENT_PREFS = new Ma
["browser.urlbar.userMadeSearchSuggestionsChoice", {what: RECORD_PREF_VALUE}],
["devtools.chrome.enabled", {what: RECORD_PREF_VALUE}],
["devtools.debugger.enabled", {what: RECORD_PREF_VALUE}],
["devtools.debugger.remote-enabled", {what: RECORD_PREF_VALUE}],
["dom.ipc.plugins.enabled", {what: RECORD_PREF_VALUE}],
["dom.ipc.processCount", {what: RECORD_PREF_VALUE}],
["dom.max_script_run_time", {what: RECORD_PREF_VALUE}],
["experiments.manifest.uri", {what: RECORD_PREF_VALUE}],
- ["extensions.allow-non-mpc-extensions", {what: RECORD_PREF_VALUE}],
["extensions.autoDisableScopes", {what: RECORD_PREF_VALUE}],
["extensions.enabledScopes", {what: RECORD_PREF_VALUE}],
["extensions.blocklist.enabled", {what: RECORD_PREF_VALUE}],
["extensions.blocklist.url", {what: RECORD_PREF_VALUE}],
["extensions.formautofill.addresses.enabled", {what: RECORD_PREF_VALUE}],
["extensions.formautofill.creditCards.enabled", {what: RECORD_PREF_VALUE}],
["extensions.legacy.enabled", {what: RECORD_PREF_VALUE}],
["extensions.strictCompatibility", {what: RECORD_PREF_VALUE}],
@@ -689,17 +688,17 @@ EnvironmentAddonBuilder.prototype = {
activeAddons[addon.id] = {
version: limitStringToLength(addon.version, MAX_ADDON_STRING_LENGTH),
scope: addon.scope,
type: addon.type,
updateDay: Utils.millisecondsToDays(updateDate.getTime()),
isSystem: addon.isSystem,
isWebExtension: addon.isWebExtension,
- multiprocessCompatible: Boolean(addon.multiprocessCompatible),
+ multiprocessCompatible: true,
};
// getActiveAddons() gives limited data during startup and full
// data after the addons database is loaded.
if (fullData) {
let installDate = new Date(Math.max(0, addon.installDate));
Object.assign(activeAddons[addon.id], {
blocklisted: (addon.blocklistState !== Ci.nsIBlocklistService.STATE_NOT_BLOCKED),
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -901,19 +901,16 @@ add_task(async function setup() {
gHttpServer = new HttpServer();
gHttpServer.start(-1);
let port = gHttpServer.identity.primaryPort;
gHttpRoot = "http://localhost:" + port + "/";
gDataRoot = gHttpRoot + "data/";
gHttpServer.registerDirectory("/data/", do_get_cwd());
registerCleanupFunction(() => gHttpServer.stop(() => {}));
- // Allow non-multiprocessCompatible extensions
- Preferences.set("extensions.allow-non-mpc-extensions", true);
-
// Create the attribution data file, so that settings.attribution will exist.
// The attribution functionality only exists in Firefox.
if (AppConstants.MOZ_BUILD_APP == "browser") {
spoofAttributionData();
registerCleanupFunction(cleanupAttributionData);
}
await spoofProfileReset();
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
@@ -22,19 +22,16 @@ numReviews=#1 review;#1 reviews
dateUpdated=Updated %S
#LOCALIZATION NOTE (notification.incompatible) %1$S is the add-on name, %2$S is brand name, %3$S is application version
notification.incompatible=%1$S is incompatible with %2$S %3$S.
#LOCALIZATION NOTE (notification.unsigned, notification.unsignedAndDisabled) %1$S is the add-on name, %2$S is brand name
notification.unsignedAndDisabled=%1$S could not be verified for use in %2$S and has been disabled.
notification.unsigned=%1$S could not be verified for use in %2$S. Proceed with caution.
notification.unsigned.link=More Information
-#LOCALIZATION NOTE (notification.nonMpcDisabled) %1$S is the add-on name
-notification.nonMpcDisabled=%1$S has been disabled since it is not multiprocess compatible.
-notification.nonMpcDisabled.link=More Information
#LOCALIZATION NOTE (notification.blocked) %1$S is the add-on name
notification.blocked=%1$S has been disabled due to security or stability issues.
notification.blocked.link=More Information
#LOCALIZATION NOTE (notification.softblocked) %1$S is the add-on name
notification.softblocked=%1$S is known to cause security or stability issues.
notification.softblocked.link=More Information
#LOCALIZATION NOTE (notification.outdated) %1$S is the add-on name
notification.outdated=An important update is available for %1$S.
@@ -80,19 +77,16 @@ installFailed=Error installing
installCancelled=Install cancelled
#LOCALIZATION NOTE (details.notification.incompatible) %1$S is the add-on name, %2$S is brand name, %3$S is application version
details.notification.incompatible=%1$S is incompatible with %2$S %3$S.
#LOCALIZATION NOTE (details.notification.unsigned, details.notification.unsignedAndDisabled) %1$S is the add-on name, %2$S is brand name
details.notification.unsignedAndDisabled=%1$S could not be verified for use in %2$S and has been disabled.
details.notification.unsigned=%1$S could not be verified for use in %2$S. Proceed with caution.
details.notification.unsigned.link=More Information
-#LOCALIZATION NOTE (details.notification.nonMpcDisabled) %1$S is the add-on name
-details.notification.nonMpcDisabled=%1$S has been disabled since it is not multiprocess compatible.
-details.notification.nonMpcDisabled.link=More Information
#LOCALIZATION NOTE (details.notification.blocked) %1$S is the add-on name
details.notification.blocked=%1$S has been disabled due to security or stability issues.
details.notification.blocked.link=More Information
#LOCALIZATION NOTE (details.notification.softblocked) %1$S is the add-on name
details.notification.softblocked=%1$S is known to cause security or stability issues.
details.notification.softblocked.link=More Information
#LOCALIZATION NOTE (details.notification.outdated) %1$S is the add-on name
details.notification.outdated=An important update is available for %1$S.
--- a/toolkit/mozapps/extensions/AddonManagerStartup.cpp
+++ b/toolkit/mozapps/extensions/AddonManagerStartup.cpp
@@ -403,18 +403,16 @@ public:
const nsString& Id() { return mId; }
nsString Path() { return GetString("path"); }
bool Bootstrapped() { return GetBool("bootstrapped"); }
bool Enabled() { return GetBool("enabled"); }
- bool ShimsEnabled() { return GetBool("enableShims"); }
-
double LastModifiedTime() { return GetNumber("lastModifiedTime"); }
Result<nsCOMPtr<nsIFile>, nsresult> FullPath();
NSLocationType LocationType();
Result<bool, nsresult> UpdateLastModifiedTime();
@@ -599,21 +597,16 @@ AddonManagerStartup::InitializeExtension
for (auto e1 : PropertyIter(cx, locs)) {
InstallLocation loc(e1);
for (auto e2 : loc.Addons()) {
Addon addon(e2);
if (addon.Enabled() && !addon.Bootstrapped()) {
Unused << AddInstallLocation(addon);
-
- if (addon.ShimsEnabled()) {
- NS_ConvertUTF16toUTF8 id(addon.Id());
- Unused << xpc::AllowCPOWsInAddon(id, true);
- }
}
}
}
return NS_OK;
}
nsresult
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -31,18 +31,16 @@ ChromeUtils.defineModuleGetter(this, "Pl
ChromeUtils.defineModuleGetter(this, "Preferences",
"resource://gre/modules/Preferences.jsm");
ChromeUtils.defineModuleGetter(this, "Experiments",
"resource:///modules/experiments/Experiments.jsm");
XPCOMUtils.defineLazyPreferenceGetter(this, "WEBEXT_PERMISSION_PROMPTS",
"extensions.webextPermissionPrompts", false);
-XPCOMUtils.defineLazyPreferenceGetter(this, "ALLOW_NON_MPC",
- "extensions.allow-non-mpc-extensions", true);
XPCOMUtils.defineLazyPreferenceGetter(this, "XPINSTALL_ENABLED",
"xpinstall.enabled", true);
XPCOMUtils.defineLazyPreferenceGetter(this, "SUPPORT_URL", "app.support.baseURL",
"", null, val => Services.urlFormatter.formatURL(val));
const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
@@ -3027,24 +3025,16 @@ var gDetailView = {
} else if (!this._addon.isCompatible && (AddonManager.checkCompatibility ||
(this._addon.blocklistState != Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.incompatible",
[this._addon.name, gStrings.brandShortName, gStrings.appVersion], 3
);
document.getElementById("detail-warning-link").hidden = true;
- } else if (this._addon.appDisabled && !this._addon.multiprocessCompatible && !ALLOW_NON_MPC) {
- this.node.setAttribute("notification", "error");
- document.getElementById("detail-error").textContent = gStrings.ext.formatStringFromName(
- "details.notification.nonMpcDisabled", [this._addon.name], 1
- );
- let errorLink = document.getElementById("detail-error-link");
- errorLink.value = gStrings.ext.GetStringFromName("details.notification.nonMpcDisabled.link");
- errorLink.href = "https://wiki.mozilla.org/Add-ons/ShimsNightly";
} else if (!isCorrectlySigned(this._addon)) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.unsigned", [this._addon.name, gStrings.brandShortName], 2
);
var warningLink = document.getElementById("detail-warning-link");
warningLink.value = gStrings.ext.GetStringFromName("details.notification.unsigned.link");
warningLink.href = SUPPORT_URL + "unsigned-addons";
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1216,27 +1216,16 @@
|| (this.mAddon.blocklistState != Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) {
this.setAttribute("notification", "warning");
this._warning.textContent = gStrings.ext.formatStringFromName(
"notification.incompatible",
[this.mAddon.name, gStrings.brandShortName, gStrings.appVersion], 3
);
this._warningLink.hidden = true;
this._warningBtn.hidden = true;
- } else if (!isUpgrade && this.mAddon.appDisabled &&
- this.mAddon.type == "extension" &&
- !this.mAddon.multiprocessCompatible &&
- !Services.prefs.getBoolPref("extensions.allow-non-mpc-extensions", true)) {
- this.setAttribute("notification", "error");
- this._error.textContent = gStrings.ext.formatStringFromName(
- "notification.nonMpcDisabled", [this.mAddon.name], 1
- );
- this._errorLink.value = gStrings.ext.GetStringFromName("notification.nonMpcDisabled.link");
- this._errorLink.href = "https://wiki.mozilla.org/Add-ons/ShimsNightly";
- this._errorLink.hidden = false;
} else if (!isUpgrade && !isCorrectlySigned(this.mAddon)) {
this.setAttribute("notification", "warning");
this._warning.textContent = gStrings.ext.formatStringFromName(
"notification.unsigned", [this.mAddon.name, gStrings.brandShortName], 2
);
this._warningLink.value = gStrings.ext.GetStringFromName("notification.unsigned.link");
this._warningLink.href = SUPPORT_URL + "unsigned-addons";
this._warningLink.hidden = false;
--- a/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
@@ -134,30 +134,29 @@ function escaped(strings, ...values) {
}
return result.join("");
}
class AddonsList {
constructor(file) {
- this.multiprocessIncompatibleIDs = new Set();
this.extensions = [];
this.themes = [];
if (!file.exists()) {
return;
}
let data = aomStartup.readStartupData();
for (let loc of Object.values(data)) {
let dir = loc.path && new nsFile(loc.path);
- for (let [id, addon] of Object.entries(loc.addons)) {
+ for (let addon of Object.values(loc.addons)) {
if (addon.enabled && !addon.bootstrapped) {
let file;
if (dir) {
file = dir.clone();
try {
file.appendRelativePath(addon.path);
} catch (e) {
file = new nsFile(addon.path);
@@ -167,19 +166,16 @@ class AddonsList {
}
addon.type = addon.type || "extension";
if (addon.type == "theme") {
this.themes.push(file);
} else {
this.extensions.push(file);
- if (addon.enableShims) {
- this.multiprocessIncompatibleIDs.add(id);
- }
}
}
}
}
}
hasItem(type, dir, id) {
var path = dir.clone();
@@ -195,20 +191,16 @@ class AddonsList {
if (file.isDirectory())
return file.equals(path);
if (file.isFile())
return file.equals(xpiPath);
return false;
});
}
- isMultiprocessIncompatible(id) {
- return this.multiprocessIncompatibleIDs.has(id);
- }
-
hasTheme(dir, id) {
return this.hasItem("themes", dir, id);
}
hasExtension(dir, id) {
return this.hasItem("extensions", dir, id);
}
}
@@ -678,17 +670,17 @@ var AddonTestUtils = {
rdf += '<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n' +
' xmlns:em="http://www.mozilla.org/2004/em-rdf#">\n';
for (let addon in data) {
rdf += escaped` <Description about="urn:mozilla:extension:${addon}"><em:updates><Seq>\n`;
for (let versionData of data[addon]) {
rdf += " <li><Description>\n";
- rdf += this._writeProps(versionData, ["version", "multiprocessCompatible"],
+ rdf += this._writeProps(versionData, ["version"],
` `);
for (let app of versionData.targetApplications || []) {
rdf += " <em:targetApplication><Description>\n";
rdf += this._writeProps(app, ["id", "minVersion", "maxVersion", "updateLink", "updateHash"],
` `);
rdf += " </Description></em:targetApplication>\n";
}
rdf += " </Description></li>\n";
@@ -732,17 +724,17 @@ var AddonTestUtils = {
rdf += '<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n' +
' xmlns:em="http://www.mozilla.org/2004/em-rdf#">\n';
rdf += '<Description about="urn:mozilla:install-manifest">\n';
let props = ["id", "version", "type", "internalName", "updateURL", "updateKey",
"optionsURL", "optionsType", "aboutURL", "iconURL", "icon64URL",
"skinnable", "bootstrap", "unpack", "strictCompatibility",
- "multiprocessCompatible", "hasEmbeddedWebExtension"];
+ "hasEmbeddedWebExtension"];
rdf += this._writeProps(data, props);
rdf += this._writeLocaleStrings(data);
for (let platform of data.targetPlatforms || [])
rdf += escaped`<em:targetPlatform>${platform}</em:targetPlatform>\n`;
for (let app of data.targetApplications || []) {
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -396,17 +396,16 @@ function parseRDFManifest(aId, aUpdateKe
} catch (e) {
logger.warn(e);
continue;
}
let result = {
id: aId,
version,
- multiprocessCompatible: getBooleanProperty(ds, item, "multiprocessCompatible"),
updateURL: getProperty(ds, targetApp, "updateLink"),
updateHash: getProperty(ds, targetApp, "updateHash"),
updateInfoURL: getProperty(ds, targetApp, "updateInfoURL"),
strictCompatibility: !!getBooleanProperty(ds, targetApp, "strictCompatibility"),
targetApplications: [appEntry]
};
// The JSON update protocol requires an SHA-2 hash. RDF still
@@ -507,17 +506,16 @@ function parseJSONManifest(aId, aUpdateK
minVersion: getProperty(app, "strict_min_version", "string",
AddonManagerPrivate.webExtensionsMinPlatformVersion),
maxVersion: "*",
};
let result = {
id: aId,
version,
- multiprocessCompatible: getProperty(update, "multiprocess_compatible", "boolean", true),
updateURL: getProperty(update, "update_link", "string"),
updateHash: getProperty(update, "update_hash", "string"),
updateInfoURL: getProperty(update, "update_info_url", "string"),
strictCompatibility: false,
targetApplications: [appEntry],
};
if ("strict_max_version" in app) {
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -319,17 +319,16 @@ async function loadManifestFromWebManife
let addon = new AddonInternal();
addon.id = bss.id;
addon.version = manifest.version;
addon.type = extension.type === "extension" ?
"webextension" : `webextension-${extension.type}`;
addon.strictCompatibility = true;
addon.bootstrap = true;
- addon.multiprocessCompatible = true;
addon.internalName = null;
addon.updateURL = bss.update_url;
addon.updateKey = null;
addon.optionsBrowserStyle = true;
addon.optionsURL = null;
addon.optionsType = null;
addon.aboutURL = null;
addon.dependencies = Object.freeze(Array.from(extension.dependencies));
@@ -548,20 +547,16 @@ async function loadManifestFromRDF(aUri,
addon.strictCompatibility = !(addon.type in COMPATIBLE_BY_DEFAULT_TYPES) ||
getRDFProperty(ds, root, "strictCompatibility") == "true";
// Only read these properties for extensions.
if (addon.type == "extension") {
addon.bootstrap = getRDFProperty(ds, root, "bootstrap") == "true";
- let mpcValue = getRDFProperty(ds, root, "multiprocessCompatible");
- addon.multiprocessCompatible = mpcValue == "true";
- addon.mpcOptedOut = mpcValue == "false";
-
addon.hasEmbeddedWebExtension = getRDFProperty(ds, root, "hasEmbeddedWebExtension") == "true";
if (addon.optionsType &&
addon.optionsType != AddonManager.OPTIONS_INLINE_BROWSER &&
addon.optionsType != AddonManager.OPTIONS_TYPE_TAB) {
throw new Error("Install manifest specifies unknown optionsType: " + addon.optionsType);
}
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -84,17 +84,16 @@ const PREF_LANGPACK_SIGNATURES =
const PREF_XPI_PERMISSIONS_BRANCH = "xpinstall.";
const PREF_INSTALL_REQUIRESECUREORIGIN = "extensions.install.requireSecureOrigin";
const PREF_INSTALL_DISTRO_ADDONS = "extensions.installDistroAddons";
const PREF_BRANCH_INSTALLED_ADDON = "extensions.installedDistroAddon.";
const PREF_DISTRO_ADDONS_PERMS = "extensions.distroAddons.promptForPermissions";
const PREF_SYSTEM_ADDON_SET = "extensions.systemAddonSet";
const PREF_SYSTEM_ADDON_UPDATE_URL = "extensions.systemAddon.update.url";
const PREF_ALLOW_LEGACY = "extensions.legacy.enabled";
-const PREF_ALLOW_NON_MPC = "extensions.allow-non-mpc-extensions";
const PREF_EM_MIN_COMPAT_APP_VERSION = "extensions.minCompatibleAppVersion";
const PREF_EM_MIN_COMPAT_PLATFORM_VERSION = "extensions.minCompatiblePlatformVersion";
const PREF_EM_LAST_APP_BUILD_ID = "extensions.lastAppBuildId";
// Specify a list of valid built-in add-ons to load.
const BUILT_IN_ADDONS_URI = "chrome://browser/content/built_in_addons.json";
@@ -147,18 +146,16 @@ const NOTIFICATION_FLUSH_PERMISSIONS =
const XPI_PERMISSION = "install";
const TOOLKIT_ID = "toolkit@mozilla.org";
const XPI_SIGNATURE_CHECK_PERIOD = 24 * 60 * 60;
XPCOMUtils.defineConstant(this, "DB_SCHEMA", 24);
-XPCOMUtils.defineLazyPreferenceGetter(this, "ALLOW_NON_MPC", PREF_ALLOW_NON_MPC);
-
const NOTIFICATION_TOOLBOX_CONNECTION_CHANGE = "toolbox-connection-change";
// Properties that exist in the install manifest
const PROP_LOCALE_SINGLE = ["name", "description", "creator", "homepageURL"];
const PROP_LOCALE_MULTI = ["developers", "translators", "contributors"];
// Properties to cache and reload when an addon installation is pending
const PENDING_INSTALL_METADATA =
@@ -850,22 +847,16 @@ function isUsableAddon(aAddon) {
return false;
}
if (isDisabledLegacy(aAddon)) {
logger.warn(`disabling legacy extension ${aAddon.id}`);
return false;
}
- if (!ALLOW_NON_MPC && aAddon.type == "extension" &&
- aAddon.multiprocessCompatible !== true) {
- logger.warn(`disabling ${aAddon.id} since it is not multiprocess compatible`);
- return false;
- }
-
if (AddonManager.checkCompatibility) {
if (!aAddon.isCompatible) {
logger.warn(`Add-on ${aAddon.id} is not compatible with application version.`);
return false;
}
} else {
let app = aAddon.matchingTargetApplication;
if (!app) {
@@ -1115,17 +1106,16 @@ function recordAddonTelemetry(aAddon) {
* The on-disk state of an individual XPI, created from an Object
* as stored in the addonStartup.json file.
*/
const JSON_FIELDS = Object.freeze([
"bootstrapped",
"changed",
"dependencies",
"enabled",
- "enableShims",
"file",
"hasEmbeddedWebExtension",
"lastModifiedTime",
"path",
"runInSafeMode",
"startupData",
"type",
"version",
@@ -1142,17 +1132,16 @@ const BOOTSTRAPPED_FIELDS = Object.freez
class XPIState {
constructor(location, id, saved = {}) {
this.location = location;
this.id = id;
// Set default values.
this.type = "extension";
this.bootstrapped = false;
- this.enableShims = false;
for (let prop of JSON_FIELDS) {
if (prop in saved) {
this[prop] = saved[prop];
}
}
if (saved.currentModifiedTime && saved.currentModifiedTime != this.lastModifiedTime) {
@@ -1180,23 +1169,21 @@ class XPIState {
* applicable.
*/
static migrate(location, id, saved, bootstrapped) {
let data = {
enabled: saved.e,
path: descriptorToPath(saved.d, location.dir),
lastModifiedTime: saved.mt || saved.st,
version: saved.v,
- enableShims: false,
};
if (bootstrapped) {
data.bootstrapped = true;
data.enabled = true;
- data.enableShims = !bootstrapped.multiprocessCompatible;
data.path = descriptorToPath(bootstrapped.descriptor, location.dir);
for (let field of BOOTSTRAPPED_FIELDS) {
if (field in bootstrapped) {
data[field] = bootstrapped[field];
}
}
}
@@ -1206,19 +1193,16 @@ class XPIState {
// Compatibility shim getters for legacy callers in XPIProviderUtils:
get mtime() {
return this.lastModifiedTime;
}
get active() {
return this.enabled;
}
- get multiprocessCompatible() {
- return !this.enableShims;
- }
/**
* @property {string} path
* The full on-disk path of the add-on.
*/
get path() {
return this.file && this.file.path;
@@ -1252,19 +1236,16 @@ class XPIState {
enabled: this.enabled,
lastModifiedTime: this.lastModifiedTime,
path: this.relativePath,
version: this.version,
};
if (this.type != "extension") {
json.type = this.type;
}
- if (this.enableShims) {
- json.enableShims = true;
- }
if (this.bootstrapped) {
json.bootstrapped = true;
json.dependencies = this.dependencies;
json.runInSafeMode = this.runInSafeMode;
json.hasEmbeddedWebExtension = this.hasEmbeddedWebExtension;
}
if (this.startupData) {
json.startupData = this.startupData;
@@ -1315,17 +1296,16 @@ class XPIState {
if (aDBAddon.type == "theme") {
this.enabled = aDBAddon.internalName == XPIProvider.selectedSkin;
} else {
this.enabled = aDBAddon.visible && !aDBAddon.disabled;
}
this.version = aDBAddon.version;
this.type = aDBAddon.type;
- this.enableShims = this.type == "extension" && !aDBAddon.multiprocessCompatible;
this.startupData = aDBAddon.startupData;
this.bootstrapped = !!aDBAddon.bootstrap;
if (this.bootstrapped) {
this.hasEmbeddedWebExtension = aDBAddon.hasEmbeddedWebExtension;
this.dependencies = aDBAddon.dependencies;
this.runInSafeMode = canRunInSafeMode(aDBAddon);
}
@@ -2177,17 +2157,16 @@ var XPIProvider = {
null);
Services.prefs.addObserver(PREF_EM_MIN_COMPAT_APP_VERSION, this);
Services.prefs.addObserver(PREF_EM_MIN_COMPAT_PLATFORM_VERSION, this);
if (!AppConstants.MOZ_REQUIRE_SIGNING || Cu.isInAutomation)
Services.prefs.addObserver(PREF_XPI_SIGNATURES_REQUIRED, this);
Services.prefs.addObserver(PREF_LANGPACK_SIGNATURES, this);
Services.prefs.addObserver(PREF_ALLOW_LEGACY, this);
- Services.prefs.addObserver(PREF_ALLOW_NON_MPC, this);
Services.obs.addObserver(this, NOTIFICATION_FLUSH_PERMISSIONS);
Services.obs.addObserver(this, NOTIFICATION_TOOLBOX_CONNECTION_CHANGE);
let flushCaches = this.checkForChanges(aAppChanged, aOldAppVersion,
aOldPlatformVersion);
// Changes to installed extensions may have changed which theme is selected
@@ -3776,17 +3755,16 @@ var XPIProvider = {
result.push({
id: addon.id,
version: addon.version,
type: addon.type,
updateDate: addon.lastModifiedTime,
scope,
isSystem,
isWebExtension: isWebExtension(addon),
- multiprocessCompatible: addon.multiprocessCompatible,
});
}
return Promise.resolve({addons: result, fullData: false});
},
/**
@@ -4038,17 +4016,16 @@ var XPIProvider = {
case PREF_EM_MIN_COMPAT_PLATFORM_VERSION:
this.minCompatiblePlatformVersion = Services.prefs.getStringPref(PREF_EM_MIN_COMPAT_PLATFORM_VERSION,
null);
this.updateAddonAppDisabledStates();
break;
case PREF_XPI_SIGNATURES_REQUIRED:
case PREF_LANGPACK_SIGNATURES:
case PREF_ALLOW_LEGACY:
- case PREF_ALLOW_NON_MPC:
this.updateAddonAppDisabledStates();
break;
}
}
},
/**
* Tests whether enabling an add-on will require a restart.
@@ -4209,48 +4186,42 @@ var XPIProvider = {
* @param aId
* The add-on's ID
* @param aFile
* The nsIFile for the add-on
* @param aVersion
* The add-on's version
* @param aType
* The type for the add-on
- * @param aMultiprocessCompatible
- * Boolean indicating whether the add-on is compatible with electrolysis.
* @param aRunInSafeMode
* Boolean indicating whether the add-on can run in safe mode.
* @param aDependencies
* An array of add-on IDs on which this add-on depends.
* @param hasEmbeddedWebExtension
* Boolean indicating whether the add-on has an embedded webextension.
* @return a JavaScript scope
*/
- loadBootstrapScope(aId, aFile, aVersion, aType,
- aMultiprocessCompatible, aRunInSafeMode,
- aDependencies, hasEmbeddedWebExtension) {
+ loadBootstrapScope(aId, aFile, aVersion, aType, aRunInSafeMode, aDependencies,
+ hasEmbeddedWebExtension) {
this.activeAddons.set(aId, {
bootstrapScope: null,
// a Symbol passed to this add-on, which it can use to identify itself
instanceID: Symbol(aId),
started: false,
});
// Mark the add-on as active for the crash reporter before loading
this.addAddonsToCrashReporter();
let activeAddon = this.activeAddons.get(aId);
logger.debug("Loading bootstrap scope from " + aFile.path);
let principal = Cc["@mozilla.org/systemprincipal;1"].
createInstance(Ci.nsIPrincipal);
- if (!aMultiprocessCompatible) {
- Cu.allowCPOWsInAddon(aId, true);
- }
if (!aFile.exists()) {
activeAddon.bootstrapScope =
new Cu.Sandbox(principal, { sandboxName: aFile.path,
addonId: aId,
wantGlobalProperties: ["ChromeUtils"],
metadata: { addonID: aId } });
logger.error("Attempted to load bootstrap scope from missing directory " + aFile.path);
@@ -4302,18 +4273,16 @@ var XPIProvider = {
/**
* Unloads a bootstrap scope by dropping all references to it and then
* updating the list of active add-ons with the crash reporter.
*
* @param aId
* The add-on's ID
*/
unloadBootstrapScope(aId) {
- Cu.allowCPOWsInAddon(aId, false);
-
this.activeAddons.delete(aId);
this.addAddonsToCrashReporter();
// Notify the BrowserToolboxProcess that an addon has been unloaded.
let wrappedJSObject = { id: aId, options: { global: null }};
Services.obs.notifyObservers({ wrappedJSObject }, "toolbox-update-addon-options");
},
@@ -4348,17 +4317,16 @@ var XPIProvider = {
Components.manager.addBootstrappedManifestLocation(aFile);
}
try {
// Load the scope if it hasn't already been loaded
let activeAddon = this.activeAddons.get(aAddon.id);
if (!activeAddon) {
this.loadBootstrapScope(aAddon.id, aFile, aAddon.version, aAddon.type,
- aAddon.multiprocessCompatible || false,
runInSafeMode, aAddon.dependencies,
aAddon.hasEmbeddedWebExtension || false);
activeAddon = this.activeAddons.get(aAddon.id);
}
if (aMethod == "startup" || aMethod == "shutdown") {
if (!aExtraParams) {
aExtraParams = {};
@@ -5125,18 +5093,16 @@ AddonInternal.prototype = {
for (let updateTarget of aUpdate.targetApplications) {
if (targetApp.id == updateTarget.id && (aSyncCompatibility ||
Services.vc.compare(targetApp.maxVersion, updateTarget.maxVersion) < 0)) {
targetApp.minVersion = updateTarget.minVersion;
targetApp.maxVersion = updateTarget.maxVersion;
}
}
}
- if (aUpdate.multiprocessCompatible !== undefined)
- this.multiprocessCompatible = aUpdate.multiprocessCompatible;
this.appDisabled = !isUsableAddon(this);
},
/**
* getDataDirectory tries to execute the callback with two arguments:
* 1) the path of the data directory within the profile,
* 2) any exception generated from trying to build it.
*/
@@ -5766,17 +5732,17 @@ function defineAddonWrapperProperty(name
enumerable: true,
});
}
["id", "syncGUID", "version", "isCompatible", "isPlatformCompatible",
"providesUpdatesSecurely", "blocklistState", "blocklistURL", "appDisabled",
"softDisabled", "skinnable", "size", "foreignInstall",
"strictCompatibility", "updateURL", "dependencies",
- "getDataDirectory", "multiprocessCompatible", "signedState", "mpcOptedOut",
+ "getDataDirectory", "signedState",
"isCorrectlySigned"].forEach(function(aProp) {
defineAddonWrapperProperty(aProp, function() {
let addon = addonFor(this);
return (aProp in addon) ? addon[aProp] : undefined;
});
});
["fullDescription", "developerComments", "supportURL",
@@ -6558,21 +6524,16 @@ class SystemAddonInstallLocation extends
return false;
}
if (!aAddon.bootstrap) {
logger.warn(`System add-on ${aAddon.id} isn't restartless.`);
return false;
}
- if (!aAddon.multiprocessCompatible) {
- logger.warn(`System add-on ${aAddon.id} isn't multiprocess compatible.`);
- return false;
- }
-
return true;
}
/**
* Tests whether the loaded add-on information matches what is expected.
*/
isValid(aAddons) {
for (let id of Object.keys(this._addonSet.addons)) {
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -55,18 +55,18 @@ const PROP_JSON_FIELDS = ["id", "syncGUI
"internalName", "updateURL", "updateKey", "optionsURL",
"optionsType", "optionsBrowserStyle", "aboutURL",
"defaultLocale", "visible", "active", "userDisabled",
"appDisabled", "pendingUninstall", "installDate",
"updateDate", "applyBackgroundUpdates", "bootstrap", "path",
"skinnable", "size", "sourceURI", "releaseNotesURI",
"softDisabled", "foreignInstall",
"strictCompatibility", "locales", "targetApplications",
- "targetPlatforms", "multiprocessCompatible", "signedState",
- "seen", "dependencies", "hasEmbeddedWebExtension", "mpcOptedOut",
+ "targetPlatforms", "signedState",
+ "seen", "dependencies", "hasEmbeddedWebExtension",
"userPermissions", "icons", "iconURL", "icon64URL",
"blocklistState", "blocklistURL", "startupData"];
// Time to wait before async save of XPI JSON database, in milliseconds
const ASYNC_SAVE_DELAY_MS = 20;
/**
* Asynchronously fill in the _repositoryAddon field for one addon
@@ -208,21 +208,16 @@ Object.assign(DBAddonInternal.prototype,
if (aTargetApp.id == aUpdateTarget.id && (aSyncCompatibility ||
Services.vc.compare(aTargetApp.maxVersion, aUpdateTarget.maxVersion) < 0)) {
aTargetApp.minVersion = aUpdateTarget.minVersion;
aTargetApp.maxVersion = aUpdateTarget.maxVersion;
XPIDatabase.saveChanges();
}
});
});
- if (aUpdate.multiprocessCompatible !== undefined &&
- aUpdate.multiprocessCompatible != this.multiprocessCompatible) {
- this.multiprocessCompatible = aUpdate.multiprocessCompatible;
- XPIDatabase.saveChanges();
- }
if (wasCompatible != this.isCompatible)
XPIProvider.updateAddonDisabledState(this);
},
toJSON() {
let jsonData = copyProperties(this, PROP_JSON_FIELDS);
--- a/toolkit/mozapps/extensions/test/browser/browser.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser.ini
@@ -81,25 +81,23 @@ skip-if = os == 'linux' && !debug # Bug
[browser_install.js]
[browser_installssl.js]
[browser_legacy.js]
[browser_legacy_pre57.js]
[browser_legacy_themes.js]
[browser_list.js]
[browser_manualupdates.js]
[browser_newaddon.js]
-[browser_non_mpc.js]
[browser_pluginprefs.js]
[browser_pluginprefs_is_not_disabled.js]
skip-if = buildapp == 'mulet'
[browser_plugin_enabled_state_locked.js]
[browser_recentupdates.js]
[browser_sorting.js]
[browser_sorting_plugins.js]
-[browser_system_addons_are_e10s.js]
[browser_tabsettings.js]
[browser_task_next_test.js]
[browser_types.js]
[browser_uninstalling.js]
[browser_update.js]
[browser_updateid.js]
[browser_updatessl.js]
[browser_webapi.js]
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_non_mpc.js
+++ /dev/null
@@ -1,108 +0,0 @@
-
-add_task(async function() {
- let extensions = [
- {
- id: "mpc@tests.mozilla.org",
- name: "Compatible extension",
- multiprocessCompatible: true,
- },
- {
- id: "not-mpc@tests.mozilla.org",
- name: "Incompatible extension",
- multiprocessCompatible: false,
- },
- ];
-
- let provider = new MockProvider();
- let addons = provider.createAddons(extensions);
- addons[1].operationsRequiringRestart = 0;
-
- let mgrWin = await open_manager(null);
- let catUtils = new CategoryUtilities(mgrWin);
-
- async function check(name, disabled) {
- await catUtils.openType("extension");
-
- let document = mgrWin.document;
- // First find the extension entry in the extensions list.
- let item = Array.from(document.getElementById("addon-list").childNodes)
- .find(i => i.getAttribute("name") == name);
-
- ok(item, `Found ${name} in extensions list`);
- item.parentNode.ensureElementIsVisible(item);
-
- // Check individual elements on this item.
- let disabledPostfix = document.getAnonymousElementByAttribute(item, "class", "disabled-postfix");
- let enableBtn = document.getAnonymousElementByAttribute(item, "anonid", "enable-btn");
- let disableBtn = document.getAnonymousElementByAttribute(item, "anonid", "disable-btn");
- let errorMsg = document.getAnonymousElementByAttribute(item, "anonid", "error");
- let errorLink = document.getAnonymousElementByAttribute(item, "anonid", "error-link");
-
- if (disabled) {
- is_element_visible(disabledPostfix, "Disabled postfix should be visible");
- is_element_hidden(enableBtn, "Enable button should be hidden");
- is_element_hidden(disableBtn, "Disable button should be hidden");
- is_element_visible(errorMsg, "Error message should be visible");
- is_element_visible(errorLink, "Error link should be visible");
- } else {
- is_element_hidden(disabledPostfix, "Disabled postfix should be hidden");
- is_element_hidden(enableBtn, "Enable button should be hidden");
- is_element_visible(disableBtn, "Disable button should be visible");
- is_element_hidden(errorMsg, "Error message should be hidden");
- is_element_hidden(errorLink, "Error link should be hidden");
- }
-
- // Click down to the details page.
- let detailsButton = document.getAnonymousElementByAttribute(item, "anonid", "details-btn");
- EventUtils.synthesizeMouseAtCenter(detailsButton, {}, mgrWin);
- await new Promise(resolve => wait_for_view_load(mgrWin, resolve));
-
- // And check its contents.
- enableBtn = mgrWin.document.getElementById("detail-enable-btn");
- disableBtn = mgrWin.document.getElementById("detail-disable-btn");
- errorMsg = mgrWin.document.getElementById("detail-error");
-
- if (disabled) {
- is_element_hidden(enableBtn, "Enable button should be hidden");
- is_element_hidden(disableBtn, "Disable button should be hidden");
- is_element_visible(errorMsg, "Error message should be visible");
- } else {
- is_element_hidden(enableBtn, "Enable button should be hidden");
- is_element_visible(disableBtn, "Disable button should be visible");
- is_element_hidden(errorMsg, "Error message should be hidden");
- }
- }
-
- // Initially, both extensions should be enabled
- await check("Compatible extension", false);
- await check("Incompatible extension", false);
-
- // Flip the pref, making the non-MPC extension disabled.
- await SpecialPowers.pushPrefEnv({
- set: [["extensions.allow-non-mpc-extensions", false]],
- });
- addons[1].appDisabled = true;
-
- // The compatible extensions should be unaffected, the incompatible
- // one should have the error message etc.
- await check("Compatible extension", false);
- await check("Incompatible extension", true);
-
- // Check that plugins and themes are not affected
- async function checkType(type) {
- await catUtils.openType(type);
-
- let document = mgrWin.document;
- let items = document.getElementById("addon-list").childNodes;
- ok(items.length > 0, `Have at least one item of type ${type}`);
- for (let item of items) {
- let errorMsg = document.getAnonymousElementByAttribute(item, "anonid", "error");
- is_element_hidden(errorMsg, `No error message for ${type}\n`);
- }
- }
-
- await checkType("theme");
- await checkType("plugin");
-
- await close_manager(mgrWin);
-});
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_system_addons_are_e10s.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-add_task(async function test_enabled() {
- let addons = await new Promise(resolved => AddonManager.getAllAddons(resolved));
- for (let addon of addons) {
- if (addon.isSystem) {
- ok(addon.multiprocessCompatible,
- `System addon ${addon.id} is not marked as multiprocess compatible`);
- ok(!addon.unpack,
- `System add-on ${addon.id} isn't a packed add-on.`);
- }
- }
-});
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -18,17 +18,16 @@ const PREF_EM_STRICT_COMPATIBILITY =
const PREF_EM_MIN_COMPAT_APP_VERSION = "extensions.minCompatibleAppVersion";
const PREF_EM_MIN_COMPAT_PLATFORM_VERSION = "extensions.minCompatiblePlatformVersion";
const PREF_GETADDONS_BYIDS = "extensions.getAddons.get.url";
const PREF_COMPAT_OVERRIDES = "extensions.getAddons.compatOverides.url";
const PREF_XPI_SIGNATURES_REQUIRED = "xpinstall.signatures.required";
const PREF_SYSTEM_ADDON_SET = "extensions.systemAddonSet";
const PREF_SYSTEM_ADDON_UPDATE_URL = "extensions.systemAddon.update.url";
const PREF_APP_UPDATE_ENABLED = "app.update.enabled";
-const PREF_ALLOW_NON_MPC = "extensions.allow-non-mpc-extensions";
const PREF_DISABLE_SECURITY = ("security.turn_off_all_security_so_that_" +
"viruses_can_take_over_this_computer");
// Forcibly end the test if it runs longer than 15 minutes
const TIMEOUT_MS = 900000;
// Maximum error in file modification times. Some file systems don't store
// modification times exactly. As long as we are closer than this then it
@@ -633,20 +632,16 @@ function startupManager(aAppChanged) {
function restartManager(aNewVersion) {
awaitPromise(promiseRestartManager(aNewVersion));
}
function shutdownManager() {
awaitPromise(promiseShutdownManager());
}
-function isItemMarkedMPIncompatible(aId) {
- return AddonTestUtils.addonsList.isMultiprocessIncompatible(aId);
-}
-
function isThemeInAddonsList(aDir, aId) {
return AddonTestUtils.addonsList.hasTheme(aDir, aId);
}
function isExtensionInAddonsList(aDir, aId) {
return AddonTestUtils.addonsList.hasExtension(aDir, aId);
}
@@ -1100,19 +1095,16 @@ Services.prefs.setBoolPref("extensions.s
// By default, set min compatible versions to 0
Services.prefs.setCharPref(PREF_EM_MIN_COMPAT_APP_VERSION, "0");
Services.prefs.setCharPref(PREF_EM_MIN_COMPAT_PLATFORM_VERSION, "0");
// Ensure signature checks are enabled by default
Services.prefs.setBoolPref(PREF_XPI_SIGNATURES_REQUIRED, true);
-// Allow non-multiprocessCompatible extensions for now
-Services.prefs.setBoolPref(PREF_ALLOW_NON_MPC, true);
-
Services.prefs.setBoolPref("extensions.legacy.enabled", true);
// Copies blocklistFile (an nsIFile) to gProfD/blocklist.xml.
function copyBlocklistToProfile(blocklistFile) {
var dest = gProfD.clone();
dest.append("blocklist.xml");
if (dest.exists())
--- a/toolkit/mozapps/extensions/test/xpcshell/test_json_updatecheck.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_json_updatecheck.js
@@ -91,17 +91,16 @@ add_task(async function test_default_val
equal(update.targetApplications.length, 1);
let targetApp = update.targetApplications[0];
equal(targetApp.id, TOOLKIT_ID);
equal(targetApp.minVersion, TOOLKIT_MINVERSION);
equal(targetApp.maxVersion, "*");
equal(update.version, "0.2");
- equal(update.multiprocessCompatible, true, "multiprocess_compatible flag");
equal(update.strictCompatibility, false, "inferred strictConpatibility flag");
equal(update.updateURL, null, "updateURL");
equal(update.updateHash, null, "updateHash");
equal(update.updateInfoURL, null, "updateInfoURL");
// If there's no applications property, we default to using one
// containing "gecko". If there is an applications property, but
// it doesn't contain "gecko", the update is skipped.
@@ -133,17 +132,16 @@ add_task(async function test_explicit_va
let updates = await checkUpdates({
id: "updatecheck-explicit@tests.mozilla.org",
version: "0.1",
updates: [{
version: "0.2",
update_link: "https://example.com/foo.xpi",
update_hash: "sha256:0",
update_info_url: "https://example.com/update_info.html",
- multiprocess_compatible: false,
applications: {
gecko: {
strict_min_version: "42.0a2.xpcshell",
strict_max_version: "43.xpcshell"
}
}
}]
});
@@ -154,17 +152,16 @@ add_task(async function test_explicit_va
equal(update.targetApplications.length, 1);
let targetApp = update.targetApplications[0];
equal(targetApp.id, TOOLKIT_ID);
equal(targetApp.minVersion, "42.0a2.xpcshell");
equal(targetApp.maxVersion, "43.xpcshell");
equal(update.version, "0.2");
- equal(update.multiprocessCompatible, false, "multiprocess_compatible flag");
equal(update.strictCompatibility, true, "inferred strictCompatibility flag");
equal(update.updateURL, "https://example.com/foo.xpi", "updateURL");
equal(update.updateHash, "sha256:0", "updateHash");
equal(update.updateInfoURL, "https://example.com/update_info.html", "updateInfoURL");
});
add_task(async function test_secure_hashes() {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_legacy.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_legacy.js
@@ -6,17 +6,16 @@ startupManager();
add_task(async function test_disable() {
let legacy = [
{
id: "bootstrap@tests.mozilla.org",
name: "Bootstrap add-on",
version: "1.0",
bootstrap: true,
- multiprocessCompatible: true,
},
{
id: "apiexperiment@tests.mozilla.org",
name: "WebExtension Experiment",
version: "1.0",
type: 256,
},
{
@@ -35,17 +34,16 @@ add_task(async function test_disable() {
applications: {gecko: {id: "webextension@tests.mozilla.org"}},
},
},
{
id: "privileged@tests.mozilla.org",
name: "Privileged Bootstrap add-on",
version: "1.0",
bootstrap: true,
- multiprocessCompatible: true,
},
{
id: "dictionary@tests.mozilla.org",
name: "Test Dictionary",
version: "1.0",
type: "64",
}
];
--- a/toolkit/mozapps/extensions/test/xpcshell/test_migrate_state_prefs.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_migrate_state_prefs.js
@@ -59,57 +59,52 @@ add_task(async function test_migrate_pre
[ID4]: {e: false, d: file4.persistentDescriptor, v: "0.4", mt: mt(file4)},
}
}));
Preferences.set("extensions.bootstrappedAddons", JSON.stringify({
[ID1]: {
version: "0.1",
type: "extension",
- multiprocessCompatible: false,
descriptor: file1.persistentDescriptor,
hasEmbeddedWebExtension: true,
}
}));
await promiseStartupManager();
// Check the the state data is updated correctly.
let states = getXS();
let addon1 = states.findAddon(ID1);
ok(addon1.enabled, "Addon 1 should be enabled");
ok(addon1.bootstrapped, "Addon 1 should be bootstrapped");
equal(addon1.version, "0.1", "Addon 1 has the correct version");
equal(addon1.mtime, mt(file1), "Addon 1 has the correct timestamp");
- ok(addon1.enableShims, "Addon 1 has shims enabled");
ok(addon1.hasEmbeddedWebExtension, "Addon 1 has an embedded WebExtension");
let addon2 = states.findAddon(ID2);
ok(!addon2.enabled, "Addon 2 should not be enabled");
ok(!addon2.bootstrapped, "Addon 2 should be bootstrapped, because that information is not stored in xpiStates");
equal(addon2.version, "0.2", "Addon 2 has the correct version");
equal(addon2.mtime, mt(file2), "Addon 2 has the correct timestamp");
- ok(!addon2.enableShims, "Addon 2 does not have shims enabled");
ok(!addon2.hasEmbeddedWebExtension, "Addon 2 no embedded WebExtension");
let addon3 = states.findAddon(ID3);
ok(addon3.enabled, "Addon 3 should be enabled");
ok(!addon3.bootstrapped, "Addon 3 should not be bootstrapped");
equal(addon3.version, "0.3", "Addon 3 has the correct version");
equal(addon3.mtime, mt(file3), "Addon 3 has the correct timestamp");
- ok(!addon3.enableShims, "Addon 3 does not have shims enabled");
ok(!addon3.hasEmbeddedWebExtension, "Addon 3 no embedded WebExtension");
let addon4 = states.findAddon(ID4);
ok(!addon4.enabled, "Addon 4 should not be enabled");
ok(!addon4.bootstrapped, "Addon 4 should not be bootstrapped");
equal(addon4.version, "0.4", "Addon 4 has the correct version");
equal(addon4.mtime, mt(file4), "Addon 4 has the correct timestamp");
- ok(!addon4.enableShims, "Addon 4 does not have shims enabled");
ok(!addon4.hasEmbeddedWebExtension, "Addon 4 no embedded WebExtension");
// Check that legacy prefs and files have been removed.
ok(!Preferences.has("extensions.xpiState"), "No xpiState pref left behind");
ok(!Preferences.has("extensions.bootstrappedAddons"), "No bootstrappedAddons pref left behind");
ok(!Preferences.has("extensions.enabledAddons"), "No enabledAddons pref left behind");
let file = AddonTestUtils.profileDir.clone();
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_multiprocessCompatible.js
+++ /dev/null
@@ -1,212 +0,0 @@
-ChromeUtils.import("resource://testing-common/httpd.js");
-var gServer;
-
-const profileDir = gProfD.clone();
-profileDir.append("extensions");
-
-const NON_MPC_PREF = "extensions.allow-non-mpc-extensions";
-
-Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
-
-function build_test(multiprocessCompatible, bootstrap, updateMultiprocessCompatible) {
- return async function() {
- dump("Running test" +
- " multiprocessCompatible: " + multiprocessCompatible +
- " bootstrap: " + bootstrap +
- " updateMultiprocessCompatible: " + updateMultiprocessCompatible +
- "\n");
-
- let addonData = {
- id: "addon@tests.mozilla.org",
- name: "Test Add-on",
- version: "1.0",
- multiprocessCompatible,
- bootstrap,
- updateURL: "http://localhost:" + gPort + "/updaterdf",
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "1",
- maxVersion: "1"
- }]
- };
-
- gServer.registerPathHandler("/updaterdf", function(request, response) {
- let updateData = {};
- updateData[addonData.id] = [{
- version: "1.0",
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "1",
- maxVersion: "1"
- }]
- }];
-
- if (updateMultiprocessCompatible !== undefined) {
- updateData[addonData.id][0].multiprocessCompatible = updateMultiprocessCompatible;
- }
-
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.write(createUpdateRDF(updateData));
- });
-
- let expectedMPC = updateMultiprocessCompatible === undefined ?
- multiprocessCompatible :
- updateMultiprocessCompatible;
-
- let xpifile = createTempXPIFile(addonData);
- let install = await AddonManager.getInstallForFile(xpifile);
- Assert.equal(install.addon.multiprocessCompatible, !!multiprocessCompatible);
- Assert.equal(install.addon.mpcOptedOut, multiprocessCompatible === false);
- await promiseCompleteAllInstalls([install]);
-
- if (!bootstrap) {
- await promiseRestartManager();
- Assert.ok(isExtensionInAddonsList(profileDir, addonData.id));
- Assert.equal(isItemMarkedMPIncompatible(addonData.id), !multiprocessCompatible);
- }
-
- let addon = await promiseAddonByID(addonData.id);
- Assert.notEqual(addon, null);
- Assert.equal(addon.multiprocessCompatible, !!multiprocessCompatible);
- Assert.equal(addon.mpcOptedOut, multiprocessCompatible === false);
-
- await promiseFindAddonUpdates(addon);
-
- // Should have applied the compatibility change
- Assert.equal(addon.multiprocessCompatible, !!expectedMPC);
- await promiseRestartManager();
-
- addon = await promiseAddonByID(addonData.id);
- // Should have persisted the compatibility change
- Assert.equal(addon.multiprocessCompatible, !!expectedMPC);
- if (!bootstrap) {
- Assert.ok(isExtensionInAddonsList(profileDir, addonData.id));
- Assert.equal(isItemMarkedMPIncompatible(addonData.id), !multiprocessCompatible);
- }
-
- addon.uninstall();
- await promiseRestartManager();
-
- gServer.registerPathHandler("/updaterdf", null);
- };
-}
-
-/* Builds a set of tests to run the same steps for every combination of:
- * The add-on being restartless
- * The initial add-on supporting multiprocess
- * The update saying the add-on should or should not support multiprocess (or not say anything at all)
- */
-for (let bootstrap of [false, true]) {
- for (let multiprocessCompatible of [undefined, false, true]) {
- for (let updateMultiprocessCompatible of [undefined, false, true]) {
- add_task(build_test(multiprocessCompatible, bootstrap, updateMultiprocessCompatible));
- }
- }
-}
-
-add_task(async function test_disable() {
- const ID_MPC = "mpc@tests.mozilla.org";
- const ID_NON_MPC = "non-mpc@tests.mozilla.org";
- const ID_DICTIONARY = "dictionary@tests.mozilla.org";
-
- let addonData = {
- name: "Test Add-on",
- version: "1.0",
- bootstrap: true,
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "1",
- maxVersion: "1"
- }]
- };
-
- let xpi1 = createTempXPIFile(Object.assign({
- id: ID_MPC,
- multiprocessCompatible: true,
- }, addonData));
- let xpi2 = createTempXPIFile(Object.assign({
- id: ID_NON_MPC,
- multiprocessCompatible: false,
- }, addonData));
- let xpi3 = createTempXPIFile({
- id: ID_DICTIONARY,
- name: "Test Dictionary",
- version: "1.0",
- type: "64",
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "1",
- maxVersion: "1"
- }]
- });
-
- async function testOnce(initialAllow) {
- if (initialAllow !== undefined) {
- Services.prefs.setBoolPref(NON_MPC_PREF, initialAllow);
- }
-
- let install1 = await AddonManager.getInstallForFile(xpi1);
- let install2 = await AddonManager.getInstallForFile(xpi2);
- let install3 = await AddonManager.getInstallForFile(xpi3);
- await promiseCompleteAllInstalls([install1, install2, install3]);
-
- let [addon1, addon2, addon3] = await AddonManager.getAddonsByIDs([ID_MPC, ID_NON_MPC, ID_DICTIONARY]);
- Assert.notEqual(addon1, null);
- Assert.equal(addon1.multiprocessCompatible, true);
- Assert.equal(addon1.appDisabled, false);
-
- Assert.notEqual(addon2, null);
- Assert.equal(addon2.multiprocessCompatible, false);
- Assert.equal(addon2.appDisabled, initialAllow === false);
-
- Assert.notEqual(addon3, null);
- Assert.equal(addon3.appDisabled, false);
-
- // Flip the allow-non-mpc preference
- let newValue = !(initialAllow === true);
- Services.prefs.setBoolPref(NON_MPC_PREF, newValue);
-
- // the mpc extension should never become appDisabled
- Assert.equal(addon1.appDisabled, false);
-
- // The non-mpc extension should become disabled if we don't allow non-mpc
- Assert.equal(addon2.appDisabled, !newValue);
-
- // A non-extension (eg a dictionary) should not become disabled
- Assert.equal(addon3.appDisabled, false);
-
- // Flip the pref back and check appDisabled
- Services.prefs.setBoolPref(NON_MPC_PREF, !newValue);
-
- Assert.equal(addon1.appDisabled, false);
- Assert.equal(addon2.appDisabled, newValue);
- Assert.equal(addon3.appDisabled, false);
-
- addon1.uninstall();
- addon2.uninstall();
- addon3.uninstall();
- }
-
- await testOnce(undefined);
- await testOnce(true);
- await testOnce(false);
-
- Services.prefs.clearUserPref(NON_MPC_PREF);
-});
-
-function run_test() {
- createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
- startupManager();
-
- // Create and configure the HTTP server.
- gServer = new HttpServer();
- gServer.registerDirectory("/data/", gTmpD);
- gServer.start(-1);
- gPort = gServer.identity.primaryPort;
-
- run_next_test();
-}
-
-function end_test() {
- gServer.stop(do_test_finished);
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -285,17 +285,16 @@ skip-if = !allow_legacy_extensions || ap
[test_locale.js]
[test_locked.js]
[test_locked2.js]
[test_locked_strictcompat.js]
[test_manifest.js]
[test_mapURIToAddonID.js]
# Same as test_bootstrap.js
skip-if = os == "android"
-[test_multiprocessCompatible.js]
[test_no_addons.js]
[test_onPropertyChanged_appDisabled.js]
[test_permissions.js]
[test_permissions_prefs.js]
[test_plugins.js]
[test_pluginchange.js]
# PluginProvider.jsm is not shipped on Android
skip-if = os == "android"