summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-05-28 10:07:00 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-05-28 10:07:00 -0400
commitb76b635c95b6a219a33fcd24107295eccf2396b8 (patch)
tree2be6366d4216d0ae4e31143e7c0387727f7691b4
parent8b9fe0e3582a0578720dc38b4ede57eac90e4594 (diff)
parent351cf27036d335e207b2a697423638dd4732cd08 (diff)
downloadUXP-b76b635c95b6a219a33fcd24107295eccf2396b8.tar
UXP-b76b635c95b6a219a33fcd24107295eccf2396b8.tar.gz
UXP-b76b635c95b6a219a33fcd24107295eccf2396b8.tar.lz
UXP-b76b635c95b6a219a33fcd24107295eccf2396b8.tar.xz
UXP-b76b635c95b6a219a33fcd24107295eccf2396b8.zip
Merge branch 'update.json'
-rw-r--r--toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm17
-rw-r--r--toolkit/mozapps/webextensions/internal/moz.build2
2 files changed, 14 insertions, 5 deletions
diff --git a/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
index bdd3a81e7..338b8c8bf 100644
--- a/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/webextensions/internal/AddonUpdateChecker.jsm
@@ -26,6 +26,12 @@ const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.
const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
+#ifdef MOZ_PHOENIX
+const PREF_EM_MIN_COMPAT_PLATFORM_VERSION = "extensions.minCompatiblePlatformVersion";
+const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
+const FIREFOX_APPCOMPATVERSION = "56.9"
+#endif
+
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -446,6 +452,10 @@ function parseRDFManifest(aId, aUpdateKey, aRequest, aManifestData) {
* @throws if the update manifest is invalid in any way
*/
function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
+#ifndef MOZ_PHOENIX
+ throw Components.Exception("This application does not support JSON update manifests");
+#endif
+
if (aUpdateKey)
throw Components.Exception("Update keys are not supported for JSON update manifests");
@@ -515,10 +525,10 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
let app = getProperty(applications, "gecko", "object");
let appEntry = {
- id: TOOLKIT_ID,
+ id: FIREFOX_ID,
minVersion: getProperty(app, "strict_min_version", "string",
- AddonManagerPrivate.webExtensionsMinPlatformVersion),
- maxVersion: "*",
+ Services.prefs.getCharPref(PREF_EM_MIN_COMPAT_PLATFORM_VERSION)),
+ maxVersion: FIREFOX_APPCOMPATVERSION,
};
let result = {
@@ -539,7 +549,6 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) {
}
appEntry.maxVersion = getProperty(app, "strict_max_version", "string");
- result.strictCompatibility = appEntry.maxVersion != "*";
} else if ("advisory_max_version" in app) {
appEntry.maxVersion = getProperty(app, "advisory_max_version", "string");
}
diff --git a/toolkit/mozapps/webextensions/internal/moz.build b/toolkit/mozapps/webextensions/internal/moz.build
index 28c34f8c9..5a3943e59 100644
--- a/toolkit/mozapps/webextensions/internal/moz.build
+++ b/toolkit/mozapps/webextensions/internal/moz.build
@@ -8,7 +8,6 @@ EXTRA_JS_MODULES.addons += [
'AddonLogging.jsm',
'AddonRepository.jsm',
'AddonRepository_SQLiteMigrator.jsm',
- 'AddonUpdateChecker.jsm',
'APIExtensionBootstrap.js',
'Content.js',
'E10SAddonsRollout.jsm',
@@ -33,4 +32,5 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
EXTRA_PP_JS_MODULES.addons += [
'AddonConstants.jsm',
+ 'AddonUpdateChecker.jsm',
]