Merge pull request #12198 from electron/fix_crash_handler

Fixed passing of exception to the system crash handler
This commit is contained in:
Cheng Zhao 2018-03-14 11:40:11 +09:00 committed by GitHub
commit 134872e9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,7 +209,10 @@ void CrashReporterWin::SetUploadParameters() {
int CrashReporterWin::CrashForException(EXCEPTION_POINTERS* info) { int CrashReporterWin::CrashForException(EXCEPTION_POINTERS* info) {
if (breakpad_) { if (breakpad_) {
breakpad_->WriteMinidumpForException(info); breakpad_->WriteMinidumpForException(info);
TerminateProcessWithoutDump(); if (skip_system_crash_handler_)
TerminateProcessWithoutDump();
else
RaiseFailFastException(info->ExceptionRecord, info->ContextRecord, 0);
} }
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
} }
@ -229,7 +232,7 @@ bool CrashReporterWin::MinidumpCallback(const wchar_t* dump_path,
MDRawAssertionInfo* assertion, MDRawAssertionInfo* assertion,
bool succeeded) { bool succeeded) {
CrashReporterWin* self = static_cast<CrashReporterWin*>(context); CrashReporterWin* self = static_cast<CrashReporterWin*>(context);
if (succeeded && !self->skip_system_crash_handler_) if (succeeded && self->skip_system_crash_handler_)
return true; return true;
else else
return false; return false;