Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: handler/mac/crash_report_exception_handler.cc

Issue 1049023003: Add ExcServerCopyState() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/simulate_crash_mac_test.cc ('k') | tools/mac/catch_exception_tool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « client/simulate_crash_mac_test.cc ('k') | tools/mac/catch_exception_tool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698