Bug 1045500 - Skip processing the plugin name for plugin crashes in the front-end for GMP plugins. r=ttaubert, a=sledru
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Tue, 29 Jul 2014 16:46:16 +0200
changeset 216201 82a8d3181fa97d3d1e0ef57795ae76196fe2e20b
parent 216200 f6c2062afda0393a8c22c723431ceb44ffe5df4a
child 216202 6c3c6a9f30c120ce70cddd275a08b12ccda58c2d
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert, sledru
bugs1045500
milestone33.0a2
Bug 1045500 - Skip processing the plugin name for plugin crashes in the front-end for GMP plugins. r=ttaubert, a=sledru
browser/base/content/browser-plugins.js
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -1157,26 +1157,35 @@ var gPluginHandler = {
       return;
 
     let propBag = aEvent.detail.QueryInterface(Ci.nsIPropertyBag2);
     let submittedReport = propBag.getPropertyAsBool("submittedCrashReport");
     let doPrompt        = true; // XXX followup for .getPropertyAsBool("doPrompt");
     let submitReports   = true; // XXX followup for .getPropertyAsBool("submitReports");
     let pluginName      = propBag.getPropertyAsAString("pluginName");
     let pluginDumpID    = propBag.getPropertyAsAString("pluginDumpID");
-    let browserDumpID = null;
+    let browserDumpID   = null;
+    let gmpPlugin       = false;
 
     try {
       browserDumpID = propBag.getPropertyAsAString("browserDumpID");
     } catch (e) {
       // For GMP crashes we don't get a browser dump.
     }
 
-    // Remap the plugin name to a more user-presentable form.
-    pluginName = this.makeNicePluginName(pluginName);
+    try {
+      gmpPlugin = propBag.getPropertyAsBool("gmpPlugin");
+    } catch (e) {
+      // This property is only set for GMP plugins.
+    }
+
+    // For non-GMP plugins, remap the plugin name to a more user-presentable form.
+    if (!gmpPlugin) {
+      pluginName = this.makeNicePluginName(pluginName);
+    }
 
     let messageString = gNavigatorBundle.getFormattedString("crashedpluginsMessage.title", [pluginName]);
 
     let plugin = null, doc;
     if (target instanceof Ci.nsIObjectLoadingContent) {
       plugin = target;
       doc = plugin.ownerDocument;
     } else {