| Index: handler/win/crash_report_exception_handler.cc
|
| diff --git a/handler/win/crash_report_exception_handler.cc b/handler/win/crash_report_exception_handler.cc
|
| index 843ac0f5a9aade7cfde120853f4fadffdb8aa9c1..fb474c2218edc9678833c98412ec10573725d40e 100644
|
| --- a/handler/win/crash_report_exception_handler.cc
|
| +++ b/handler/win/crash_report_exception_handler.cc
|
| @@ -40,30 +40,23 @@ CrashReportExceptionHandler::~CrashReportExceptionHandler() {
|
| void CrashReportExceptionHandler::ExceptionHandlerServerStarted() {
|
| }
|
|
|
| -unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
|
| +void CrashReportExceptionHandler::ExceptionHandlerServerException(
|
| HANDLE process,
|
| WinVMAddress exception_information_address) {
|
| - const unsigned int kFailedTerminationCode = 0xffff7002;
|
| -
|
| ScopedProcessSuspend suspend(process);
|
|
|
| ProcessSnapshotWin process_snapshot;
|
| if (!process_snapshot.Initialize(process,
|
| ProcessSuspensionState::kSuspended)) {
|
| LOG(WARNING) << "ProcessSnapshotWin::Initialize failed";
|
| - return kFailedTerminationCode;
|
| + return;
|
| }
|
|
|
| if (!process_snapshot.InitializeException(exception_information_address)) {
|
| LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed";
|
| - return kFailedTerminationCode;
|
| + return;
|
| }
|
|
|
| - // Now that we have the exception information, even if something else fails we
|
| - // can terminate the process with the correct exit code.
|
| - const unsigned int termination_code =
|
| - process_snapshot.Exception()->Exception();
|
| -
|
| CrashpadInfoClientOptions client_options;
|
| process_snapshot.GetCrashpadOptions(&client_options);
|
| if (client_options.crashpad_handler_behavior != TriState::kDisabled) {
|
| @@ -84,7 +77,7 @@ unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
|
| database_->PrepareNewCrashReport(&new_report);
|
| if (database_status != CrashReportDatabase::kNoError) {
|
| LOG(ERROR) << "PrepareNewCrashReport failed";
|
| - return termination_code;
|
| + return;
|
| }
|
|
|
| process_snapshot.SetReportID(new_report->uuid);
|
| @@ -98,7 +91,7 @@ unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
|
| minidump.InitializeFromSnapshot(&process_snapshot);
|
| if (!minidump.WriteEverything(&file_writer)) {
|
| LOG(ERROR) << "WriteEverything failed";
|
| - return termination_code;
|
| + return;
|
| }
|
|
|
| call_error_writing_crash_report.Disarm();
|
| @@ -107,13 +100,11 @@ unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
|
| database_status = database_->FinishedWritingCrashReport(new_report, &uuid);
|
| if (database_status != CrashReportDatabase::kNoError) {
|
| LOG(ERROR) << "FinishedWritingCrashReport failed";
|
| - return termination_code;
|
| + return;
|
| }
|
|
|
| upload_thread_->ReportPending();
|
| }
|
| -
|
| - return termination_code;
|
| }
|
|
|
| } // namespace crashpad
|
|
|