Add a new argument to specify the minidump type to write on Windows.

R=ted.mielczarek@gmail.com
BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1267329

Review URL: https://codereview.chromium.org/2107083002/ .
This commit is contained in:
Ting-Yu Chou 2016-06-29 06:44:24 -04:00 committed by Ted Mielczarek
parent e0f2c17988
commit dfd2da7979
2 changed files with 10 additions and 6 deletions

View file

@ -764,9 +764,10 @@ bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) {
// static
bool ExceptionHandler::WriteMinidump(const wstring &dump_path,
MinidumpCallback callback,
void* callback_context) {
void* callback_context,
MINIDUMP_TYPE dump_type) {
ExceptionHandler handler(dump_path, NULL, callback, callback_context,
HANDLER_NONE);
HANDLER_NONE, dump_type, (HANDLE)NULL, NULL);
return handler.WriteMinidump();
}
@ -775,7 +776,8 @@ bool ExceptionHandler::WriteMinidumpForChild(HANDLE child,
DWORD child_blamed_thread,
const wstring& dump_path,
MinidumpCallback callback,
void* callback_context) {
void* callback_context,
MINIDUMP_TYPE dump_type) {
EXCEPTION_RECORD ex;
CONTEXT ctx;
EXCEPTION_POINTERS exinfo = { NULL, NULL };
@ -806,7 +808,7 @@ bool ExceptionHandler::WriteMinidumpForChild(HANDLE child,
}
ExceptionHandler handler(dump_path, NULL, callback, callback_context,
HANDLER_NONE);
HANDLER_NONE, dump_type, (HANDLE)NULL, NULL);
bool success = handler.WriteMinidumpWithExceptionForProcess(
child_blamed_thread,
exinfo.ExceptionRecord ? &exinfo : NULL,

View file

@ -238,7 +238,8 @@ class ExceptionHandler {
// Convenience form of WriteMinidump which does not require an
// ExceptionHandler instance.
static bool WriteMinidump(const wstring &dump_path,
MinidumpCallback callback, void* callback_context);
MinidumpCallback callback, void* callback_context,
MINIDUMP_TYPE dump_type = MiniDumpNormal);
// Write a minidump of |child| immediately. This can be used to
// capture the execution state of |child| independently of a crash.
@ -249,7 +250,8 @@ class ExceptionHandler {
DWORD child_blamed_thread,
const wstring& dump_path,
MinidumpCallback callback,
void* callback_context);
void* callback_context,
MINIDUMP_TYPE dump_type = MiniDumpNormal);
// Get the thread ID of the thread requesting the dump (either the exception
// thread or any other thread that called WriteMinidump directly). This