diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 23:39:47 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 23:39:47 +0100 |
commit | 642032029f65e9dc0d38fbb6d35ef656c73a292c (patch) | |
tree | 78a22bd12d679ab532db490d631ee69fa085aec1 /toolkit/mozapps/extensions | |
parent | 50ef259a2df60d020ccb02d76dc5aa4835ee319e (diff) | |
parent | 2529b2edece0a0ed86553d1e73eef13c3848bf64 (diff) | |
download | UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.gz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.lz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.xz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.zip |
Merge branch 'master' into release
Diffstat (limited to 'toolkit/mozapps/extensions')
-rw-r--r-- | toolkit/mozapps/extensions/GMPUtils.jsm | 11 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/internal/GMPProvider.jsm | 15 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm | 3 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 22 |
4 files changed, 18 insertions, 33 deletions
diff --git a/toolkit/mozapps/extensions/GMPUtils.jsm b/toolkit/mozapps/extensions/GMPUtils.jsm index a199b4d86..814ae4914 100644 --- a/toolkit/mozapps/extensions/GMPUtils.jsm +++ b/toolkit/mozapps/extensions/GMPUtils.jsm @@ -7,8 +7,7 @@ const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components; -this.EXPORTED_SYMBOLS = [ "EME_ADOBE_ID", - "GMP_PLUGIN_IDS", +this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS", "GMPPrefs", "GMPUtils", "OPEN_H264_ID", @@ -20,9 +19,8 @@ Cu.import("resource://gre/modules/AppConstants.jsm"); // GMP IDs const OPEN_H264_ID = "gmp-gmpopenh264"; -const EME_ADOBE_ID = "gmp-eme-adobe"; const WIDEVINE_ID = "gmp-widevinecdm"; -const GMP_PLUGIN_IDS = [ OPEN_H264_ID, EME_ADOBE_ID, WIDEVINE_ID ]; +const GMP_PLUGIN_IDS = [ OPEN_H264_ID, WIDEVINE_ID ]; var GMPPluginUnsupportedReason = { NOT_WINDOWS: 1, @@ -72,10 +70,7 @@ this.GMPUtils = { if (this._isPluginForceSupported(aPlugin)) { return true; } - if (aPlugin.id == EME_ADOBE_ID) { - // Windows Vista and later only supported by Adobe EME. - return AppConstants.isPlatformAndVersionAtLeast("win", "6"); - } else if (aPlugin.id == WIDEVINE_ID) { + if (aPlugin.id == WIDEVINE_ID) { // The Widevine plugin is available for Windows versions Vista and later, // Mac OSX, and Linux. return AppConstants.isPlatformAndVersionAtLeast("win", "6") || diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm index 131db7249..2ebde08bb 100644 --- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm +++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm @@ -49,22 +49,11 @@ const GMP_PLUGINS = [ homepageURL: "http://www.openh264.org/", optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul" }, -/* - { - id: EME_ADOBE_ID, - name: "eme-adobe_name", - description: "eme-adobe_description", - licenseURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM_EULA/index.html", - homepageURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM", - optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul", - isEME: true - }, -*/ { id: WIDEVINE_ID, - name: "widevine_description", + name: "widevine_name", // Describe the purpose of both CDMs in the same way. - description: "eme-adobe_description", + description: "widevine_description2", licenseURL: "https://www.google.com/policies/privacy/", homepageURL: "https://www.widevine.com/", optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul", diff --git a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm index f98dd2a94..c6324da0a 100644 --- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm +++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm @@ -7,9 +7,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; const LOCAL_EME_SOURCES = [{ - "id": "gmp-eme-adobe", - "src": "chrome://global/content/gmp-sources/eme-adobe.json" -}, { "id": "gmp-gmpopenh264", "src": "chrome://global/content/gmp-sources/openh264.json" }, { diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 99a121da4..600ec2ff5 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -220,6 +220,7 @@ const COMPATIBLE_BY_DEFAULT_TYPES = { }; const MSG_JAR_FLUSH = "AddonJarFlush"; +const MSG_MESSAGE_MANAGER_CACHES_FLUSH = "AddonMessageManagerCachesFlush"; var gGlobalScope = this; @@ -1199,13 +1200,16 @@ function buildJarURI(aJarfile, aPath) { */ function flushJarCache(aJarFile) { Services.obs.notifyObservers(aJarFile, "flush-cache-entry", null); - Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageBroadcaster) - .broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path); + Services.mm.broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path); } -function flushStartupCache() { +function flushChromeCaches() { // Init this, so it will get the notification. Services.obs.notifyObservers(null, "startupcache-invalidate", null); + // Flush message manager cached scripts + Services.obs.notifyObservers(null, "message-manager-flush-caches", null); + // Also dispatch this event to child processes + Services.mm.broadcastAsyncMessage(MSG_MESSAGE_MANAGER_CACHES_FLUSH, null); } /** @@ -2129,7 +2133,7 @@ this.XPIProvider = { } if (flushCaches) { - flushStartupCache(); + Services.obs.notifyObservers(null, "startupcache-invalidate", null); // UI displayed early in startup (like the compatibility UI) may have // caused us to cache parts of the skin or locale in memory. These must // be flushed to allow extension provided skins and locales to take full @@ -2665,7 +2669,7 @@ this.XPIProvider = { existingAddon, "uninstall", uninstallReason, { newVersion: newVersion }); this.unloadBootstrapScope(existingAddonID); - flushStartupCache(); + flushChromeCaches(); } } catch (e) { @@ -2939,7 +2943,7 @@ this.XPIProvider = { // If the new add-on is bootstrapped and active then call its install method if (newDBAddon.active && newDBAddon.bootstrap) { // Startup cache must be flushed before calling the bootstrap script - flushStartupCache(); + flushChromeCaches(); let installReason = Services.vc.compare(aOldAddon.version, newDBAddon.version) < 0 ? BOOTSTRAP_REASONS.ADDON_UPGRADE : @@ -3344,7 +3348,7 @@ this.XPIProvider = { // If the new add-on is bootstrapped then we must flush the caches // before calling the new bootstrap script if (newDBAddon.bootstrap) - flushStartupCache(); + flushChromeCaches(); } if (!newDBAddon.bootstrap) @@ -4746,7 +4750,7 @@ this.XPIProvider = { this.callBootstrapMethod(aAddon, file, "uninstall", BOOTSTRAP_REASONS.ADDON_UNINSTALL); this.unloadBootstrapScope(aAddon.id); - flushStartupCache(); + flushChromeCaches(); } aAddon._installLocation.uninstallAddon(aAddon.id); XPIDatabase.removeAddonMetadata(aAddon); @@ -5876,7 +5880,7 @@ AddonInstall.prototype = { "uninstall", reason, { newVersion: this.addon.version }); XPIProvider.unloadBootstrapScope(this.existingAddon.id); - flushStartupCache(); + flushChromeCaches(); } if (!isUpgrade && this.existingAddon.active) { |