diff options
author | Jeremy Andrews <athenian200@outlook.com> | 2022-10-03 12:30:03 -0500 |
---|---|---|
committer | Jeremy Andrews <athenian200@outlook.com> | 2022-10-03 17:13:57 -0500 |
commit | 87ef3606e29c5d01658857b4bf8bb121c3a2d495 (patch) | |
tree | a928d609ff5f6c9c3f40b8a71105377328fd1ba2 /toolkit/mozapps/extensions/internal | |
parent | 4ced37546e2d1daafbaa4c6b2fd76462e09464dc (diff) | |
download | uxp-87ef3606e29c5d01658857b4bf8bb121c3a2d495.tar.gz |
Issue #2012 - Change name of feature to AppCompat GUID.
It's not just for supporting "Phoenix" extensions anymore.
Diffstat (limited to 'toolkit/mozapps/extensions/internal')
5 files changed, 15 insertions, 15 deletions
diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.jsm b/toolkit/mozapps/extensions/internal/AddonRepository.jsm index 9814a5f816..8b094850e9 100644 --- a/toolkit/mozapps/extensions/internal/AddonRepository.jsm +++ b/toolkit/mozapps/extensions/internal/AddonRepository.jsm @@ -63,7 +63,7 @@ const BLANK_DB = function() { } const TOOLKIT_ID = "toolkit@mozilla.org"; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID const APPCOMPATID = Services.prefs.getCharPref("extensions.guid.appCompatId"); #endif Cu.import("resource://gre/modules/Log.jsm"); @@ -1253,7 +1253,7 @@ this.AddonRepository = { let results = []; function isSameApplication(aAppNode) { -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID if (self._getTextContent(aAppNode) == Services.appinfo.ID || self._getTextContent(aAppNode) == APPCOMPATID) { #else diff --git a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm index 50a2e552b0..11db378eeb 100644 --- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm +++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm @@ -523,7 +523,7 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) { maxVersion: getRequiredProperty(app, "max_version", "string"), } } -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID else if (APPCOMPATID in applications) { logger.debug("update.json: Dual-GUID targetApplication"); app = getProperty(applications, APPCOMPATID, "object"); @@ -558,7 +558,7 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) { id: TOOLKIT_ID, minVersion: platformVersion, #endif -#if defined(MOZ_PHOENIX) && defined(MOZ_PHOENIX_EXTENSIONS) +#if defined(MOZ_PHOENIX) && defined(UXP_APPCOMPAT_GUID) maxVersion: APPCOMPATVERSION, #else maxVersion: '*', @@ -833,7 +833,7 @@ function matchesVersions(aUpdate, aAppVersion, aPlatformVersion, return (Services.vc.compare(aAppVersion, app.minVersion) >= 0) && (aIgnoreMaxVersion || (Services.vc.compare(aAppVersion, app.maxVersion) <= 0)); } -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID if (app.id == APPCOMPATID) { return (Services.vc.compare(aAppVersion, app.minVersion) >= 0) && (aIgnoreMaxVersion || (Services.vc.compare(aAppVersion, app.maxVersion) <= 0)); @@ -896,7 +896,7 @@ this.AddonUpdateChecker = { if (aIgnoreCompatibility) { for (let targetApp of update.targetApplications) { let id = targetApp.id; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID if (id == Services.appinfo.ID || id == APPCOMPATID || id == TOOLKIT_ID) #else diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index ab769e001a..add3f3d727 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -134,7 +134,7 @@ 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"; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID const APPCOMPATID = Services.prefs.getCharPref("extensions.guid.appCompatId"); const APPCOMPATVERSION = Services.prefs.getCharPref("extensions.guid.appCompatVersion"); #endif @@ -6403,14 +6403,14 @@ AddonInternal.prototype = { if (!aPlatformVersion) aPlatformVersion = Services.appinfo.platformVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID this.native = false; #endif let version; if (app.id == Services.appinfo.ID) { version = aAppVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID this.native = true; } else if (app.id == APPCOMPATID) { @@ -6421,7 +6421,7 @@ AddonInternal.prototype = { #endif } else if (app.id == TOOLKIT_ID) { -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID this.native = true; #endif version = aPlatformVersion; @@ -6446,7 +6446,7 @@ AddonInternal.prototype = { // Extremely old extensions should not be compatible by default. let minCompatVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID if (app.id == Services.appinfo.ID || app.id == APPCOMPATID) #else if (app.id == Services.appinfo.ID) @@ -6474,7 +6474,7 @@ AddonInternal.prototype = { if (targetApp.id == TOOLKIT_ID) app = targetApp; } -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID // Special case: check for AppCompat GUID TargetApps. this has to be done AFTER // the initial check to make sure appinfo.ID is preferred, even if // AppCompat GUID is listed before it in the install manifest. diff --git a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js index 512479d762..c1a120b2bf 100644 --- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js +++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js @@ -71,7 +71,7 @@ const PROP_JSON_FIELDS = ["id", "syncGUID", "location", "version", "type", "softDisabled", "foreignInstall", "hasBinaryComponents", "strictCompatibility", "locales", "targetApplications", "targetPlatforms", "multiprocessCompatible", -#ifdef MOZ_PHOENIX_EXTENSIONS +#ifdef UXP_APPCOMPAT_GUID "native" #endif ]; diff --git a/toolkit/mozapps/extensions/internal/moz.build b/toolkit/mozapps/extensions/internal/moz.build index 3b967e0c6f..7183aa67aa 100644 --- a/toolkit/mozapps/extensions/internal/moz.build +++ b/toolkit/mozapps/extensions/internal/moz.build @@ -30,5 +30,5 @@ if CONFIG['MOZ_EM_DEBUG']: DEFINES['MOZ_EM_DEBUG'] = 1 # Apperently this needs to be defined because it isn't picked up automagically any more -if CONFIG['MOZ_PHOENIX_EXTENSIONS']: - DEFINES['MOZ_PHOENIX_EXTENSIONS'] = 1
\ No newline at end of file +if CONFIG['UXP_APPCOMPAT_GUID']: + DEFINES['UXP_APPCOMPAT_GUID'] = 1 |