Bug 788512 - Actually generate Flash process dumps instead of just collecting them if present. r=bsmedberg,ted
This commit is contained in:
@@ -300,6 +300,27 @@ GetProcessCpuUsage(const InfallibleTArray<base::ProcessHandle>& processHandles,
|
||||
} // anonymous namespace
|
||||
#endif // #ifdef XP_WIN
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
||||
static bool
|
||||
CreateFlashMinidump(DWORD processId, ThreadId childThread,
|
||||
nsIFile* parentMinidump, const nsACString& name)
|
||||
{
|
||||
if (processId == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
base::ProcessHandle handle;
|
||||
if (!base::OpenPrivilegedProcessHandle(processId, &handle)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool res = CreateAdditionalChildMinidump(handle, 0, parentMinidump, name);
|
||||
base::CloseProcessHandle(handle);
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
PluginModuleParent::ShouldContinueFromReplyTimeout()
|
||||
{
|
||||
@@ -322,19 +343,13 @@ PluginModuleParent::ShouldContinueFromReplyTimeout()
|
||||
pluginDumpFile) {
|
||||
nsCOMPtr<nsIFile> childDumpFile;
|
||||
|
||||
if (mFlashProcess1 &&
|
||||
TakeMinidumpForChild(mFlashProcess1,
|
||||
getter_AddRefs(childDumpFile))) {
|
||||
if (CreateFlashMinidump(mFlashProcess1, 0, pluginDumpFile,
|
||||
NS_LITERAL_CSTRING("flash1"))) {
|
||||
additionalDumps.Append(",flash1");
|
||||
RenameAdditionalHangMinidump(pluginDumpFile, childDumpFile,
|
||||
NS_LITERAL_CSTRING("flash1"));
|
||||
}
|
||||
if (mFlashProcess2 &&
|
||||
TakeMinidumpForChild(mFlashProcess2,
|
||||
getter_AddRefs(childDumpFile))) {
|
||||
if (CreateFlashMinidump(mFlashProcess2, 0, pluginDumpFile,
|
||||
NS_LITERAL_CSTRING("flash2"))) {
|
||||
additionalDumps.Append(",flash2");
|
||||
RenameAdditionalHangMinidump(pluginDumpFile, childDumpFile,
|
||||
NS_LITERAL_CSTRING("flash2"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user