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

Unified Diff: snapshot/mac/process_snapshot_mac.cc

Issue 997713002: Allow exception forwarding to the system’s native crash reporter to be disabled (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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
Index: snapshot/mac/process_snapshot_mac.cc
diff --git a/snapshot/mac/process_snapshot_mac.cc b/snapshot/mac/process_snapshot_mac.cc
index bb11526706551b0fc7b41a670b5cd04899bd2cb2..4edb628bbab64217330a42dabab540ba133f46a8 100644
--- a/snapshot/mac/process_snapshot_mac.cc
+++ b/snapshot/mac/process_snapshot_mac.cc
@@ -79,6 +79,43 @@ bool ProcessSnapshotMac::InitializeException(
return true;
}
+void ProcessSnapshotMac::GetCrashpadOptions(
+ CrashpadInfo::TriState* enable_crashpad_handler,
+ CrashpadInfo::TriState* enable_native_crash_reporter_forwarding) {
+ INITIALIZATION_STATE_DCHECK_VALID(initialized_);
+
+ CrashpadInfo::TriState local_enable_crashpad_handler = CrashpadInfo::kDefault;
+ CrashpadInfo::TriState local_enable_native_crash_reporter_forwarding =
+ CrashpadInfo::kDefault;
+
+ for (internal::ModuleSnapshotMac* module : modules_) {
+ CrashpadInfo::TriState module_enable_crashpad_handler;
+ CrashpadInfo::TriState module_enable_native_crash_reporter_forwarding;
+ module->GetCrashpadOptions(
+ &module_enable_crashpad_handler,
+ &module_enable_native_crash_reporter_forwarding);
+
+ if (local_enable_crashpad_handler == CrashpadInfo::kDefault) {
+ local_enable_crashpad_handler = module_enable_crashpad_handler;
+ }
+ if (local_enable_native_crash_reporter_forwarding ==
+ CrashpadInfo::kDefault) {
+ local_enable_native_crash_reporter_forwarding =
+ module_enable_native_crash_reporter_forwarding;
+ }
+
+ if (local_enable_crashpad_handler != CrashpadInfo::kDefault &&
+ local_enable_native_crash_reporter_forwarding !=
+ CrashpadInfo::kDefault) {
+ break;
+ }
+ }
+
+ *enable_crashpad_handler = local_enable_crashpad_handler;
+ *enable_native_crash_reporter_forwarding =
+ local_enable_native_crash_reporter_forwarding;
+}
+
pid_t ProcessSnapshotMac::ProcessID() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
return process_reader_.ProcessID();

Powered by Google App Engine
This is Rietveld 408576698