diff --git a/browser/modules/PluginContent.jsm b/browser/modules/PluginContent.jsm index 0d93f970cf10..14937069257c 100644 --- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -121,7 +121,7 @@ PluginContent.prototype = { }, observe: function observe(aSubject, aTopic, aData) { - let pluginTag = aSubject; + let pluginTag = aSubject.QueryInterface(Ci.nsIPluginTag); if (aTopic == "Plugin::HiddenPluginTouched") { this._showClickToPlayNotification(pluginTag, false); } else { @@ -207,7 +207,7 @@ PluginContent.prototype = { }; }, - _getPluginInfoForTag: function (pluginTag, tagMimetype, fallbackType) { + _getPluginInfoForTag: function (pluginTag, tagMimetype) { let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); let pluginName = gNavigatorBundle.GetStringFromName("pluginInfo.unknownPlugin"); @@ -241,7 +241,7 @@ PluginContent.prototype = { pluginName: pluginName, pluginTag: pluginTag, permissionString: permissionString, - fallbackType: fallbackType, + fallbackType: null, blocklistState: blocklistState, }; }, @@ -762,7 +762,13 @@ PluginContent.prototype = { let location = this.content.document.location.href; for (let p of plugins) { - let pluginInfo = this._getPluginInfo(p); + let pluginInfo; + if (p instanceof Ci.nsIPluginTag) { + let mimeType = p.getMimeTypes() > 0 ? p.getMimeTypes()[0] : null; + pluginInfo = this._getPluginInfoForTag(p, mimeType); + } else { + pluginInfo = this._getPluginInfo(p); + } if (pluginInfo.permissionString === null) { Cu.reportError("No permission string for active plugin."); continue;