diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-04-07 03:29:35 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-04-07 03:29:35 -0400 |
commit | 987d105f55fd38dde9c9117e1946dc48bfe4c1dc (patch) | |
tree | 45e7af320fe57df30e103f7396e1d99a18e958ee /toolkit | |
parent | 4e38ba8670623ed8e68aed5fd10fdb66eca66826 (diff) | |
download | UXP-987d105f55fd38dde9c9117e1946dc48bfe4c1dc.tar UXP-987d105f55fd38dde9c9117e1946dc48bfe4c1dc.tar.gz UXP-987d105f55fd38dde9c9117e1946dc48bfe4c1dc.tar.lz UXP-987d105f55fd38dde9c9117e1946dc48bfe4c1dc.tar.xz UXP-987d105f55fd38dde9c9117e1946dc48bfe4c1dc.zip |
[WebExAM] Use a special "platform" ID and version number for WebExtensions in XPIProvider.jsm
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/mozapps/webextensions/internal/XPIProvider.jsm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm index 87e09cef1..7c3cb6763 100644 --- a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm @@ -175,6 +175,8 @@ const RDFURI_INSTALL_MANIFEST_ROOT = "urn:mozilla:install-manifest"; const PREFIX_NS_EM = "http://www.mozilla.org/2004/em-rdf#"; const TOOLKIT_ID = "toolkit@mozilla.org"; +const WEBEXTENSIONS_ID = "webextensions@mozilla.org"; +const WEBEXTENSIONS_VERSION = "52.0"; const XPI_SIGNATURE_CHECK_PERIOD = 24 * 60 * 60; @@ -1037,7 +1039,7 @@ var loadManifestFromWebManifest = Task.async(function*(aUri) { delete addon.defaultLocale.locales; addon.targetApplications = [{ - id: TOOLKIT_ID, + id: WEBEXTENSIONS_ID, minVersion: bss.strict_min_version, maxVersion: bss.strict_max_version, }]; @@ -7228,6 +7230,8 @@ AddonInternal.prototype = { version = aAppVersion; else if (app.id == TOOLKIT_ID) version = aPlatformVersion + else if (app.id == WEBEXTENSIONS_ID) + version = WEBEXTENSIONS_VERSION // Only extensions and dictionaries can be compatible by default; themes // and language packs always use strict compatibility checking. @@ -7250,7 +7254,7 @@ AddonInternal.prototype = { let minCompatVersion; if (app.id == Services.appinfo.ID) minCompatVersion = XPIProvider.minCompatibleAppVersion; - else if (app.id == TOOLKIT_ID) + else if (app.id == TOOLKIT_ID || app.id == WEBEXTENSIONS_ID) minCompatVersion = XPIProvider.minCompatiblePlatformVersion; if (minCompatVersion && @@ -7269,7 +7273,7 @@ AddonInternal.prototype = { for (let targetApp of this.targetApplications) { if (targetApp.id == Services.appinfo.ID) return targetApp; - if (targetApp.id == TOOLKIT_ID) + if (targetApp.id == TOOLKIT_ID || targetApp.id == WEBEXTENSIONS_ID) app = targetApp; } return app; |