diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-03-24 19:20:40 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-03-24 19:20:40 -0500 |
commit | bb55da6f5776e3656232cc4e31e29fb06091c5b0 (patch) | |
tree | e61dbfa0d91c278b1d9128109ddf5d06c67645c5 /components | |
parent | fcf40fb6ef6f254b4b9e79ecaf85dd3a9151f00c (diff) | |
download | aura-central-bb55da6f5776e3656232cc4e31e29fb06091c5b0.tar.gz |
Revert "Issue %28 - Restore the ability to accept Firefox GUIDs"
This reverts commit 4ed3977948fc54f3c794d71f4df6136c959ab42a.
Diffstat (limited to 'components')
-rw-r--r-- | components/addons/content/extensions.js | 13 | ||||
-rw-r--r-- | components/addons/content/extensions.xml | 16 | ||||
-rw-r--r-- | components/addons/locale/extensions.properties | 6 | ||||
-rw-r--r-- | components/addons/moz.build | 4 | ||||
-rw-r--r-- | components/addons/src/AddonRepository.jsm | 10 | ||||
-rw-r--r-- | components/addons/src/AddonUpdateChecker.jsm | 28 | ||||
-rw-r--r-- | components/addons/src/XPIProvider.jsm | 36 | ||||
-rw-r--r-- | components/addons/src/XPIProviderUtils.js | 3 |
8 files changed, 1 insertions, 115 deletions
diff --git a/components/addons/content/extensions.js b/components/addons/content/extensions.js index 7a65ac5c0..11c853524 100644 --- a/components/addons/content/extensions.js +++ b/components/addons/content/extensions.js @@ -3028,19 +3028,6 @@ var gDetailView = { errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link"); errorLink.href = this._addon.blocklistURL; errorLink.hidden = false; -#ifdef MOZ_PHOENIX_EXTENSIONS - } else if (this._addon.native == false) { - this.node.setAttribute("notification", "warning"); - this.node.setAttribute("native", "false"); - document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName( - "details.notification.compatibility", - [this._addon.name, gStrings.brandShortName], 2 - ); - var warningLink = document.getElementById("detail-warning-link"); - warningLink.value = gStrings.ext.GetStringFromName("details.notification.compatibility.link"); - warningLink.href = Services.urlFormatter.formatURLPref("extensions.compatibility.url"); - warningLink.hidden = false; -#endif } else { this.node.removeAttribute("notification"); } diff --git a/components/addons/content/extensions.xml b/components/addons/content/extensions.xml index 48be575ab..9ea6a50df 100644 --- a/components/addons/content/extensions.xml +++ b/components/addons/content/extensions.xml @@ -1330,22 +1330,6 @@ this._errorLink.hidden = false; } else { this.removeAttribute("notification"); -#ifdef MOZ_PHOENIX_EXTENSIONS - if (this.mAddon.type == "extension") { - this.setAttribute("native", this.mAddon.native); - if (this.mAddon.native == false) { - this.setAttribute("notification", "warning"); - this._warning.textContent = gStrings.ext.formatStringFromName( - "notification.compatibility", - [this.mAddon.name, gStrings.brandShortName], 2 - ); - this._warningLink.value = gStrings.ext.GetStringFromName("notification.compatibility.link"); - this._warningLink.href = Services.urlFormatter.formatURLPref("extensions.compatibility.url"); - this._warningLink.hidden = false; - this._warningBtn.hidden = true; - } - } -#endif } } diff --git a/components/addons/locale/extensions.properties b/components/addons/locale/extensions.properties index 0172cd0c6..43ab02a47 100644 --- a/components/addons/locale/extensions.properties +++ b/components/addons/locale/extensions.properties @@ -30,9 +30,6 @@ notification.blocked.link=More Information #LOCALIZATION NOTE (notification.softblocked) %1$S is the add-on name notification.softblocked=%1$S is known to cause issues. notification.softblocked.link=More Information -#LOCALIZATION NOTE (notification.compatibility) %1$S is the add-on name, %2$S is brand name -notification.compatibility=%1$S was not designed for %2$S. It may not function properly or cease to function. -notification.compatibility.link=More Information #LOCALIZATION NOTE (notification.outdated) %1$S is the add-on name notification.outdated=An important update is available for %1$S. notification.outdated.link=Update Now @@ -82,9 +79,6 @@ 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 issues. details.notification.softblocked.link=More Information -#LOCALIZATION NOTE (details.notification.compatibility) %1$S is the add-on name, %2$S is brand name -details.notification.compatibility=%1$S was not designed for %2$S. It may not function properly or cease to function. -details.notification.compatibility.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. details.notification.outdated.link=Update Now diff --git a/components/addons/moz.build b/components/addons/moz.build index a6cb84851..22193c1e7 100644 --- a/components/addons/moz.build +++ b/components/addons/moz.build @@ -11,10 +11,6 @@ DEFINES['MOZ_EXTENSIONS_DB_SCHEMA'] = 16 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 - XPIDL_SOURCES += [ 'public/amIAddonManager.idl', 'public/amIAddonPathService.idl', diff --git a/components/addons/src/AddonRepository.jsm b/components/addons/src/AddonRepository.jsm index ab06f03f6..8432886b6 100644 --- a/components/addons/src/AddonRepository.jsm +++ b/components/addons/src/AddonRepository.jsm @@ -63,10 +63,7 @@ const BLANK_DB = function() { }; } -const TOOLKIT_ID = "toolkit@mozilla.org"; -#ifdef MOZ_PHOENIX_EXTENSIONS -const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; -#endif +const TOOLKIT_ID = "toolkit@mozilla.org"; Cu.import("resource://gre/modules/Log.jsm"); const LOGGER_ID = "addons.repository"; @@ -1254,12 +1251,7 @@ this.AddonRepository = { let results = []; function isSameApplication(aAppNode) { -#ifdef MOZ_PHOENIX_EXTENSIONS - if (self._getTextContent(aAppNode) == Services.appinfo.ID || - self._getTextContent(aAppNode) == FIREFOX_ID) { -#else if (self._getTextContent(aAppNode) == Services.appinfo.ID) { -#endif return true; } return false; diff --git a/components/addons/src/AddonUpdateChecker.jsm b/components/addons/src/AddonUpdateChecker.jsm index 112f4a1ff..17c17c907 100644 --- a/components/addons/src/AddonUpdateChecker.jsm +++ b/components/addons/src/AddonUpdateChecker.jsm @@ -25,7 +25,6 @@ const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/pa const TOOLKIT_ID = "toolkit@mozilla.org"; const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; -const FIREFOX_APPCOMPATVERSION = "56.9"; const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts"; const PREF_EM_MIN_COMPAT_APP_VERSION = "extensions.minCompatibleAppVersion"; @@ -521,18 +520,6 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) { maxVersion: getRequiredProperty(app, "max_version", "string"), } } -#ifdef MOZ_PHOENIX_EXTENSIONS - else if (FIREFOX_ID in applications) { - logger.debug("update.json: Dual-GUID targetApplication"); - app = getProperty(applications, FIREFOX_ID, "object"); - - appEntry = { - id: FIREFOX_ID, - minVersion: getRequiredProperty(app, "min_version", "string"), - maxVersion: getRequiredProperty(app, "max_version", "string"), - } - } -#endif else if (TOOLKIT_ID in applications) { logger.debug("update.json: Toolkit targetApplication"); app = getProperty(applications, TOOLKIT_ID, "object"); @@ -556,11 +543,7 @@ function parseJSONManifest(aId, aUpdateKey, aRequest, aManifestData) { id: TOOLKIT_ID, minVersion: platformVersion, #endif -#if defined(MOZ_PHOENIX) && defined(MOZ_PHOENIX_EXTENSIONS) - maxVersion: FIREFOX_APPCOMPATVERSION, -#else maxVersion: '*', -#endif }; } else { @@ -821,12 +804,6 @@ 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 - if (app.id == FIREFOX_ID) { - return (Services.vc.compare(aAppVersion, app.minVersion) >= 0) && - (aIgnoreMaxVersion || (Services.vc.compare(aAppVersion, app.maxVersion) <= 0)); - } -#endif if (app.id == TOOLKIT_ID) { result = (Services.vc.compare(aPlatformVersion, app.minVersion) >= 0) && (aIgnoreMaxVersion || (Services.vc.compare(aPlatformVersion, app.maxVersion) <= 0)); @@ -884,12 +861,7 @@ this.AddonUpdateChecker = { if (aIgnoreCompatibility) { for (let targetApp of update.targetApplications) { let id = targetApp.id; -#ifdef MOZ_PHOENIX_EXTENSIONS - if (id == Services.appinfo.ID || id == FIREFOX_ID || - id == TOOLKIT_ID) -#else if (id == Services.appinfo.ID || id == TOOLKIT_ID) -#endif return update; } } diff --git a/components/addons/src/XPIProvider.jsm b/components/addons/src/XPIProvider.jsm index 7ef102751..e9e556f99 100644 --- a/components/addons/src/XPIProvider.jsm +++ b/components/addons/src/XPIProvider.jsm @@ -134,10 +134,6 @@ 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 -const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" -const FIREFOX_APPCOMPATVERSION = "56.9" -#endif // The value for this is in Makefile.in #expand const DB_SCHEMA = __MOZ_EXTENSIONS_DB_SCHEMA__; @@ -6368,27 +6364,11 @@ AddonInternal.prototype = { if (!aPlatformVersion) aPlatformVersion = Services.appinfo.greVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS - this.native = false; -#endif - let version; if (app.id == Services.appinfo.ID) { version = aAppVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS - this.native = true; - } - else if (app.id == FIREFOX_ID) { - version = FIREFOX_APPCOMPATVERSION; - if (this.type != "extension") - //Only allow -extensions- in Firefox compatibility mode - return false; -#endif } else if (app.id == TOOLKIT_ID) { -#ifdef MOZ_PHOENIX_EXTENSIONS - this.native = true; -#endif version = aPlatformVersion; } @@ -6411,11 +6391,7 @@ AddonInternal.prototype = { // Extremely old extensions should not be compatible by default. let minCompatVersion; -#ifdef MOZ_PHOENIX_EXTENSIONS - if (app.id == Services.appinfo.ID || app.id == FIREFOX_ID) -#else if (app.id == Services.appinfo.ID) -#endif minCompatVersion = XPIProvider.minCompatibleAppVersion; else if (app.id == TOOLKIT_ID) minCompatVersion = XPIProvider.minCompatiblePlatformVersion; @@ -6439,18 +6415,6 @@ AddonInternal.prototype = { if (targetApp.id == TOOLKIT_ID) app = targetApp; } --#ifdef MOZ_PHOENIX_EXTENSIONS - // Special case: check for Firefox TargetApps. this has to be done AFTER - // the initial check to make sure appinfo.ID is preferred, even if - // Firefox is listed before it in the install manifest. - // Only do this for extensions. Other types should not be allowed. - if (this.type == "extension") { - for (let targetApp of this.targetApplications) { - if (targetApp.id == FIREFOX_ID) //Firefox GUID - return targetApp; - } - } -#endif // Return toolkit ID if toolkit. return app; }, diff --git a/components/addons/src/XPIProviderUtils.js b/components/addons/src/XPIProviderUtils.js index 512479d76..9f3273b1a 100644 --- a/components/addons/src/XPIProviderUtils.js +++ b/components/addons/src/XPIProviderUtils.js @@ -71,9 +71,6 @@ const PROP_JSON_FIELDS = ["id", "syncGUID", "location", "version", "type", "softDisabled", "foreignInstall", "hasBinaryComponents", "strictCompatibility", "locales", "targetApplications", "targetPlatforms", "multiprocessCompatible", -#ifdef MOZ_PHOENIX_EXTENSIONS - "native" -#endif ]; // Time to wait before async save of XPI JSON database, in milliseconds |