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

Unified Diff: handler/mac/crash_report_exception_handler.cc

Issue 982613002: handler: Add report upload (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 10 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 | « handler/mac/crash_report_exception_handler.h ('k') | handler/mac/crash_report_upload_thread.h » ('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 ec23e3017e6e04dbeb465ea836bccb2f55ca76a1..42f303ba9c4ebc2fd9612cbe04a0c84d67f5013e 100644
--- a/handler/mac/crash_report_exception_handler.cc
+++ b/handler/mac/crash_report_exception_handler.cc
@@ -59,9 +59,11 @@ class CallErrorWritingCrashReport {
CrashReportExceptionHandler::CrashReportExceptionHandler(
CrashReportDatabase* database,
- CrashReportUploadThread* upload_thread)
+ CrashReportUploadThread* upload_thread,
+ const std::map<std::string, std::string>* process_annotations)
: database_(database),
- upload_thread_(upload_thread) {
+ upload_thread_(upload_thread),
+ process_annotations_(process_annotations) {
}
CrashReportExceptionHandler::~CrashReportExceptionHandler() {
@@ -108,6 +110,18 @@ kern_return_t CrashReportExceptionHandler::CatchMachException(
return KERN_FAILURE;
}
+ if (!process_snapshot.InitializeException(thread,
+ exception,
+ code,
+ code_count,
+ *flavor,
+ old_state,
+ old_state_count)) {
+ return KERN_FAILURE;
+ }
+
+ process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
+
CrashReportDatabase::NewReport* new_report;
CrashReportDatabase::OperationStatus database_status =
database_->PrepareNewCrashReport(&new_report);
« no previous file with comments | « handler/mac/crash_report_exception_handler.h ('k') | handler/mac/crash_report_upload_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698