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

Unified Diff: handler/mac/crash_report_exception_handler.cc

Issue 1018853006: crashpad_database_util: add --new-report (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crashpad_database_util
Patch Set: Rebase 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/crash_report_database.cc ('k') | tools/crashpad_database_util.ad » ('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..43531d4cabcc2166499a34867dfbbea34a417875 100644
--- a/handler/mac/crash_report_exception_handler.cc
+++ b/handler/mac/crash_report_exception_handler.cc
@@ -36,37 +36,6 @@
namespace crashpad {
-namespace {
-
-// Calls CrashReportDatabase::ErrorWritingCrashReport() upon destruction unless
-// disarmed by calling Disarm(). Armed upon construction.
-class CallErrorWritingCrashReport {
- public:
- CallErrorWritingCrashReport(CrashReportDatabase* database,
- CrashReportDatabase::NewReport* new_report)
- : database_(database),
- new_report_(new_report) {
- }
-
- ~CallErrorWritingCrashReport() {
- if (new_report_) {
- database_->ErrorWritingCrashReport(new_report_);
- }
- }
-
- void Disarm() {
- new_report_ = nullptr;
- }
-
- private:
- CrashReportDatabase* database_; // weak
- CrashReportDatabase::NewReport* new_report_; // weak
-
- DISALLOW_COPY_AND_ASSIGN(CallErrorWritingCrashReport);
-};
-
-} // namespace
-
CrashReportExceptionHandler::CrashReportExceptionHandler(
CrashReportDatabase* database,
CrashReportUploadThread* upload_thread,
@@ -171,8 +140,8 @@ kern_return_t CrashReportExceptionHandler::CatchMachException(
process_snapshot.SetReportID(new_report->uuid);
- CallErrorWritingCrashReport call_error_writing_crash_report(database_,
- new_report);
+ CrashReportDatabase::CallErrorWritingCrashReport
+ call_error_writing_crash_report(database_, new_report);
WeakFileHandleFileWriter file_writer(new_report->handle);
« no previous file with comments | « client/crash_report_database.cc ('k') | tools/crashpad_database_util.ad » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698