Index: handler/mac/crash_report_exception_handler.cc |
diff --git a/handler/mac/crash_report_exception_handler.cc b/handler/mac/crash_report_exception_handler.cc |
index 404bfcac0ae20abde6158eb4005353422ac570d9..1eaec68c90a9732e7848fe8069dc833896c3b783 100644 |
--- a/handler/mac/crash_report_exception_handler.cc |
+++ b/handler/mac/crash_report_exception_handler.cc |
@@ -193,6 +193,7 @@ kern_return_t CrashReportExceptionHandler::CatchMachException( |
upload_thread_->ReportPending(); |
} |
+ bool forwarded = false; |
if (client_options.system_crash_reporter_forwarding != TriState::kDisabled && |
(exception == EXC_CRASH || |
exception == EXC_RESOURCE || |
@@ -243,11 +244,20 @@ kern_return_t CrashReportExceptionHandler::CatchMachException( |
old_state_count, |
new_state_forward_count ? &new_state_forward[0] : nullptr, |
&new_state_forward_count); |
- MACH_LOG_IF(WARNING, kr != KERN_SUCCESS, kr) |
- << "UniversalExceptionRaise " << kSystemCrashReporterServiceName; |
+ if (kr == KERN_SUCCESS) { |
+ forwarded = true; |
+ } else { |
+ MACH_LOG(WARNING, kr) |
+ << "UniversalExceptionRaise " << kSystemCrashReporterServiceName; |
+ } |
} |
} |
+ if (!forwarded) { |
+ ExcServerCopyState( |
+ behavior, old_state, old_state_count, new_state, new_state_count); |
+ } |
+ |
return ExcServerSuccessfulReturnValue(behavior, false); |
} |