bug 605832 - small Breakpad fixes to allow writing minidumps from the CrashGenerationServer callback. r=cjones a=blocking-fennec

This commit is contained in:
Ted Mielczarek 2010-11-24 09:15:02 -05:00
parent 7014184af8
commit 83a740b386
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ struct ClientInfo {
CrashGenerationServer* crash_server_;
pid_t pid_;
char* crash_context;
size_t crash_context_size;
};
}

View File

@ -387,7 +387,8 @@ CrashGenerationServer::ClientEvent(short revents)
if (!MakeMinidumpFilename(minidump_filename))
return true;
if (!google_breakpad::WriteMinidump(minidump_filename.c_str(),
if (generate_dumps_ &&
!google_breakpad::WriteMinidump(minidump_filename.c_str(),
crashing_pid, crash_context,
kCrashContextSize)) {
HANDLE_EINTR(close(signal_fd));
@ -399,6 +400,8 @@ CrashGenerationServer::ClientEvent(short revents)
info.crash_server_ = this;
info.pid_ = crashing_pid;
info.crash_context = crash_context;
info.crash_context_size = kCrashContextSize;
dump_callback_(dump_context_, &info, &minidump_filename);
}