summaryrefslogtreecommitdiff
path: root/toolkit/mozapps/extensions/internal/XPIProvider.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/extensions/internal/XPIProvider.jsm')
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm30
1 files changed, 15 insertions, 15 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index e12549094d..add3f3d727 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -134,9 +134,9 @@ 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"
+#ifdef UXP_APPCOMPAT_GUID
+const APPCOMPATID = Services.prefs.getCharPref("extensions.guid.appCompatId");
+const APPCOMPATVERSION = Services.prefs.getCharPref("extensions.guid.appCompatVersion");
#endif
// The value for this is in Makefile.in
@@ -6403,25 +6403,25 @@ 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 == FIREFOX_ID) {
- version = FIREFOX_APPCOMPATVERSION;
+ else if (app.id == APPCOMPATID) {
+ version = APPCOMPATVERSION;
if (this.type != "extension")
- //Only allow extensions in Firefox compatibility mode
+ //Only allow extensions in AppCompat GUID compatibility mode
return false;
#endif
}
else if (app.id == TOOLKIT_ID) {
-#ifdef MOZ_PHOENIX_EXTENSIONS
+#ifdef UXP_APPCOMPAT_GUID
this.native = true;
#endif
version = aPlatformVersion;
@@ -6446,8 +6446,8 @@ 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)
+#ifdef UXP_APPCOMPAT_GUID
+ if (app.id == Services.appinfo.ID || app.id == APPCOMPATID)
#else
if (app.id == Services.appinfo.ID)
#endif
@@ -6474,14 +6474,14 @@ 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
+#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
- // Firefox is listed before it in the install manifest.
+ // AppCompat GUID 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
+ if (targetApp.id == APPCOMPATID) // AppCompat GUID
return targetApp;
}
}