OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 private: | 51 private: |
52 CrashReportDatabase* database_; // weak | 52 CrashReportDatabase* database_; // weak |
53 CrashReportDatabase::NewReport* new_report_; // weak | 53 CrashReportDatabase::NewReport* new_report_; // weak |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(CallErrorWritingCrashReport); | 55 DISALLOW_COPY_AND_ASSIGN(CallErrorWritingCrashReport); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace | 58 } // namespace |
59 | 59 |
60 CrashReportExceptionHandler::CrashReportExceptionHandler( | 60 CrashReportExceptionHandler::CrashReportExceptionHandler( |
61 CrashReportDatabase* database) | 61 CrashReportDatabase* database, |
62 : database_(database) { | 62 CrashReportUploadThread* upload_thread) |
| 63 : database_(database), |
| 64 upload_thread_(upload_thread) { |
63 } | 65 } |
64 | 66 |
65 CrashReportExceptionHandler::~CrashReportExceptionHandler() { | 67 CrashReportExceptionHandler::~CrashReportExceptionHandler() { |
66 } | 68 } |
67 | 69 |
68 kern_return_t CrashReportExceptionHandler::CatchMachException( | 70 kern_return_t CrashReportExceptionHandler::CatchMachException( |
69 exception_behavior_t behavior, | 71 exception_behavior_t behavior, |
70 exception_handler_t exception_port, | 72 exception_handler_t exception_port, |
71 thread_t thread, | 73 thread_t thread, |
72 task_t task, | 74 task_t task, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 127 } |
126 | 128 |
127 call_error_writing_crash_report.Disarm(); | 129 call_error_writing_crash_report.Disarm(); |
128 | 130 |
129 UUID uuid; | 131 UUID uuid; |
130 database_status = database_->FinishedWritingCrashReport(new_report, &uuid); | 132 database_status = database_->FinishedWritingCrashReport(new_report, &uuid); |
131 if (database_status != CrashReportDatabase::kNoError) { | 133 if (database_status != CrashReportDatabase::kNoError) { |
132 return KERN_FAILURE; | 134 return KERN_FAILURE; |
133 } | 135 } |
134 | 136 |
| 137 upload_thread_->ReportPending(); |
| 138 |
135 return ExcServerSuccessfulReturnValue(behavior, false); | 139 return ExcServerSuccessfulReturnValue(behavior, false); |
136 } | 140 } |
137 | 141 |
138 } // namespace crashpad | 142 } // namespace crashpad |
OLD | NEW |