Backed out changeset d6df8807c839 (bug 1155908) for bustage

This commit is contained in:
Carsten "Tomcat" Book 2015-04-23 10:34:39 +02:00
Родитель 6afb396da3
Коммит 8f421f43e9
1 изменённых файлов: 31 добавлений и 27 удалений

Просмотреть файл

@ -1112,17 +1112,26 @@ PluginModuleChromeParent::AnnotateHang(mozilla::HangMonitor::HangAnnotations& aA
} }
} }
#ifdef MOZ_CRASHREPORTER_INJECTOR
static bool static bool
CreatePluginMinidump(base::ProcessId processId, ThreadId childThread, CreateFlashMinidump(DWORD processId, ThreadId childThread,
nsIFile* parentMinidump, const nsACString& name) nsIFile* parentMinidump, const nsACString& name)
{ {
mozilla::ipc::ScopedProcessHandle handle; if (processId == 0) {
if (processId == 0 ||
!base::OpenPrivilegedProcessHandle(processId, &handle.rwget())) {
return false; return false;
} }
return CreateAdditionalChildMinidump(handle, 0, parentMinidump, name);
base::ProcessHandle handle;
if (!base::OpenPrivilegedProcessHandle(processId, &handle)) {
return false;
}
bool res = CreateAdditionalChildMinidump(handle, 0, parentMinidump, name);
base::CloseProcessHandle(handle);
return res;
} }
#endif
bool bool
PluginModuleChromeParent::ShouldContinueFromReplyTimeout() PluginModuleChromeParent::ShouldContinueFromReplyTimeout()
@ -1192,37 +1201,32 @@ PluginModuleChromeParent::TerminateChildProcess(MessageLoop* aMsgLoop)
} }
} }
#endif // XP_WIN #endif // XP_WIN
// Generate base report, includes plugin and browser process minidumps.
if (crashReporter->GeneratePairedMinidump(this)) { if (crashReporter->GeneratePairedMinidump(this)) {
mPluginDumpID = crashReporter->ChildDumpID(); mPluginDumpID = crashReporter->ChildDumpID();
PLUGIN_LOG_DEBUG( PLUGIN_LOG_DEBUG(
("generated paired browser/plugin minidumps: %s)", ("generated paired browser/plugin minidumps: %s)",
NS_ConvertUTF16toUTF8(mPluginDumpID).get())); NS_ConvertUTF16toUTF8(mPluginDumpID).get()));
nsAutoCString additionalDumps("browser"); nsAutoCString additionalDumps("browser");
#ifdef MOZ_CRASHREPORTER_INJECTOR
nsCOMPtr<nsIFile> pluginDumpFile; nsCOMPtr<nsIFile> pluginDumpFile;
if (GetMinidumpForID(mPluginDumpID, getter_AddRefs(pluginDumpFile)) && if (GetMinidumpForID(mPluginDumpID, getter_AddRefs(pluginDumpFile)) &&
pluginDumpFile) { pluginDumpFile) {
#ifdef MOZ_CRASHREPORTER_INJECTOR nsCOMPtr<nsIFile> childDumpFile;
// If we have handles to the flash sandbox processes on Windows,
// include those minidumps as well. if (CreateFlashMinidump(mFlashProcess1, 0, pluginDumpFile,
if (CreatePluginMinidump(mFlashProcess1, 0, pluginDumpFile,
NS_LITERAL_CSTRING("flash1"))) { NS_LITERAL_CSTRING("flash1"))) {
additionalDumps.AppendLiteral(",flash1"); additionalDumps.AppendLiteral(",flash1");
} }
if (CreatePluginMinidump(mFlashProcess2, 0, pluginDumpFile, if (CreateFlashMinidump(mFlashProcess2, 0, pluginDumpFile,
NS_LITERAL_CSTRING("flash2"))) { NS_LITERAL_CSTRING("flash2"))) {
additionalDumps.AppendLiteral(",flash2"); additionalDumps.AppendLiteral(",flash2");
} }
}
#endif #endif
if (mContentParent) {
// Include the content process minidump
if (CreatePluginMinidump(mContentParent->OtherPid(), 0,
pluginDumpFile,
NS_LITERAL_CSTRING("content"))) {
additionalDumps.AppendLiteral(",content");
}
}
}
crashReporter->AnnotateCrashReport( crashReporter->AnnotateCrashReport(
NS_LITERAL_CSTRING("additional_minidumps"), NS_LITERAL_CSTRING("additional_minidumps"),
additionalDumps); additionalDumps);