Bug 788512 - Add dumps for Flash processes to the modified plugin hang report. r=bsmedberg
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Tue, 11 Sep 2012 17:21:26 +0200
changeset 107813 b14f17141bb14b10dd8f37efaf242489b3a361dc
parent 107812 c4c2b82b79a2344473cc4c066042e109895bc08a
child 107814 030b4a47baa44960005ea2c38bef573024e44d2e
push id23510
push userkhuey@mozilla.com
push dateSat, 22 Sep 2012 22:46:15 +0000
treeherdermozilla-central@9d285bedbc1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs788512
milestone18.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 788512 - Add dumps for Flash processes to the modified plugin hang report. r=bsmedberg
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -296,21 +296,45 @@ PluginModuleParent::ShouldContinueFromRe
     crashReporter->AnnotateCrashReport(NS_LITERAL_CSTRING("PluginHang"),
                                        NS_LITERAL_CSTRING("1"));
     if (crashReporter->GeneratePairedMinidump(this)) {
         mPluginDumpID = crashReporter->ChildDumpID();
         PLUGIN_LOG_DEBUG(
                 ("generated paired browser/plugin minidumps: %s)",
                  NS_ConvertUTF16toUTF8(mPluginDumpID).get()));
 
+        nsAutoCString additionalDumps("browser");
+
+#ifdef MOZ_CRASHREPORTER_INJECTOR
+        nsCOMPtr<nsIFile> pluginDumpFile;
+
+        if (GetMinidumpForID(mPluginDumpID, getter_AddRefs(pluginDumpFile)) &&
+            pluginDumpFile) {
+          nsCOMPtr<nsIFile> childDumpFile;
+
+          if (mFlashProcess1 &&
+              TakeMinidumpForChild(mFlashProcess1,
+                                   getter_AddRefs(childDumpFile))) {
+            additionalDumps.Append(",flash1");
+            RenameAdditionalHangMinidump(pluginDumpFile, childDumpFile,
+                                         NS_LITERAL_CSTRING("flash1"));
+          }
+          if (mFlashProcess2 &&
+              TakeMinidumpForChild(mFlashProcess2,
+                                   getter_AddRefs(childDumpFile))) {
+            additionalDumps.Append(",flash2");
+            RenameAdditionalHangMinidump(pluginDumpFile, childDumpFile,
+                                         NS_LITERAL_CSTRING("flash2"));
+          }
+        }
+#endif
+
         crashReporter->AnnotateCrashReport(
             NS_LITERAL_CSTRING("additional_minidumps"),
-            NS_LITERAL_CSTRING("browser"));
-
-        // TODO: collect Flash minidumps here
+            additionalDumps);
     } else {
         NS_WARNING("failed to capture paired minidumps from hang");
     }
 #endif
 
 #ifdef XP_WIN
     // collect cpu usage for plugin processes