Bug 1085710 - Stop trying to send nsIPluginTag over IPC (r=mconley)
authorBill McCloskey <wmccloskey@mozilla.com>
Wed, 29 Oct 2014 08:04:51 -0700
changeset 212884 ee7994387e65177c8bac2c4541f4dd75d81bdcb7
parent 212883 55310850248c649cbfc0c101d998b2c3a0837e7d
child 212885 a469d36c6b825de2b5f93490a7f4eeec57ac8f0f
push id51079
push userwmccloskey@mozilla.com
push dateWed, 29 Oct 2014 15:05:53 +0000
treeherdermozilla-inbound@0f7fd7a22708 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1085710
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1085710 - Stop trying to send nsIPluginTag over IPC (r=mconley)
browser/modules/PluginContent.jsm
--- a/browser/modules/PluginContent.jsm
+++ b/browser/modules/PluginContent.jsm
@@ -120,16 +120,24 @@ PluginContent.prototype = {
     if (tagMimetype == "") {
       tagMimetype = pluginElement.type;
     }
 
     if (this.isKnownPlugin(pluginElement)) {
       pluginTag = pluginHost.getPluginTagForType(pluginElement.actualType);
       pluginName = BrowserUtils.makeNicePluginName(pluginTag.name);
 
+      // Convert this from nsIPluginTag so it can be serialized.
+      let properties = ["name", "description", "filename", "version", "enabledState"];
+      let pluginTagCopy = {};
+      for (let prop of properties) {
+        pluginTagCopy[prop] = pluginTag[prop];
+      }
+      pluginTag = pluginTagCopy;
+
       permissionString = pluginHost.getPermissionStringForType(pluginElement.actualType);
       fallbackType = pluginElement.defaultFallbackType;
       blocklistState = pluginHost.getBlocklistStateForType(pluginElement.actualType);
       // Make state-softblocked == state-notblocked for our purposes,
       // they have the same UI. STATE_OUTDATED should not exist for plugin
       // items, but let's alias it anyway, just in case.
       if (blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED ||
           blocklistState == Ci.nsIBlocklistService.STATE_OUTDATED) {