summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 06:07:37 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:37:29 +0200
commit9e42d9ea2f36633eeb1447ad9980495e3d00b40f (patch)
treee30a0cab855b5c9e5fd0cc520c63deb8257ef98f /toolkit/mozapps/extensions
parent377f54f3fe9fd40bc246a5ecc1f52873298c0b7c (diff)
downloadUXP-9e42d9ea2f36633eeb1447ad9980495e3d00b40f.tar
UXP-9e42d9ea2f36633eeb1447ad9980495e3d00b40f.tar.gz
UXP-9e42d9ea2f36633eeb1447ad9980495e3d00b40f.tar.lz
UXP-9e42d9ea2f36633eeb1447ad9980495e3d00b40f.tar.xz
UXP-9e42d9ea2f36633eeb1447ad9980495e3d00b40f.zip
Issue #65 - Remove AppConstants from toolkit/mozapps/extensions
Diffstat (limited to 'toolkit/mozapps/extensions')
-rw-r--r--toolkit/mozapps/extensions/GMPUtils.jsm17
-rw-r--r--toolkit/mozapps/extensions/moz.build2
2 files changed, 11 insertions, 8 deletions
diff --git a/toolkit/mozapps/extensions/GMPUtils.jsm b/toolkit/mozapps/extensions/GMPUtils.jsm
index 814ae4914..3c691610d 100644
--- a/toolkit/mozapps/extensions/GMPUtils.jsm
+++ b/toolkit/mozapps/extensions/GMPUtils.jsm
@@ -15,7 +15,6 @@ this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS",
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
// GMP IDs
const OPEN_H264_ID = "gmp-gmpopenh264";
@@ -71,21 +70,25 @@ this.GMPUtils = {
return true;
}
if (aPlugin.id == WIDEVINE_ID) {
+
+#if defined(XP_WIN) || defined(XP_LINUX) || defined(XP_MACOSX)
// The Widevine plugin is available for Windows versions Vista and later,
// Mac OSX, and Linux.
- return AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
- AppConstants.platform == "macosx" ||
- AppConstants.platform == "linux";
+ return true;
+#else
+ return false;
+#endif
}
return true;
},
_is32bitModeMacOS: function() {
- if (AppConstants.platform != "macosx") {
- return false;
- }
+#ifdef XP_MACOSX
return Services.appinfo.XPCOMABI.split("-")[0] == "x86";
+#else
+ return false;
+#endif
},
/**
diff --git a/toolkit/mozapps/extensions/moz.build b/toolkit/mozapps/extensions/moz.build
index 104e8d734..b65ce4c68 100644
--- a/toolkit/mozapps/extensions/moz.build
+++ b/toolkit/mozapps/extensions/moz.build
@@ -29,13 +29,13 @@ EXTRA_PP_COMPONENTS += [
EXTRA_JS_MODULES += [
'ChromeManifestParser.jsm',
'DeferredSave.jsm',
- 'GMPUtils.jsm',
'LightweightThemeManager.jsm',
]
EXTRA_PP_JS_MODULES += [
'AddonManager.jsm',
'GMPInstallManager.jsm',
+ 'GMPUtils.jsm',
]
# Additional debugging info is exposed in debug builds