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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 process_snapshot.SetClientID(client_id); | 162 process_snapshot.SetClientID(client_id); |
163 process_snapshot.SetAnnotationsSimpleMap(*process_annotations_); | 163 process_snapshot.SetAnnotationsSimpleMap(*process_annotations_); |
164 | 164 |
165 CrashReportDatabase::NewReport* new_report; | 165 CrashReportDatabase::NewReport* new_report; |
166 CrashReportDatabase::OperationStatus database_status = | 166 CrashReportDatabase::OperationStatus database_status = |
167 database_->PrepareNewCrashReport(&new_report); | 167 database_->PrepareNewCrashReport(&new_report); |
168 if (database_status != CrashReportDatabase::kNoError) { | 168 if (database_status != CrashReportDatabase::kNoError) { |
169 return KERN_FAILURE; | 169 return KERN_FAILURE; |
170 } | 170 } |
171 | 171 |
| 172 process_snapshot.SetReportID(new_report->uuid); |
| 173 |
172 CallErrorWritingCrashReport call_error_writing_crash_report(database_, | 174 CallErrorWritingCrashReport call_error_writing_crash_report(database_, |
173 new_report); | 175 new_report); |
174 | 176 |
175 WeakFileHandleFileWriter file_writer(new_report->handle); | 177 WeakFileHandleFileWriter file_writer(new_report->handle); |
176 | 178 |
177 MinidumpFileWriter minidump; | 179 MinidumpFileWriter minidump; |
178 minidump.InitializeFromSnapshot(&process_snapshot); | 180 minidump.InitializeFromSnapshot(&process_snapshot); |
179 if (!minidump.WriteEverything(&file_writer)) { | 181 if (!minidump.WriteEverything(&file_writer)) { |
180 return KERN_FAILURE; | 182 return KERN_FAILURE; |
181 } | 183 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 &new_state_forward_count); | 245 &new_state_forward_count); |
244 MACH_LOG_IF(WARNING, kr != KERN_SUCCESS, kr) | 246 MACH_LOG_IF(WARNING, kr != KERN_SUCCESS, kr) |
245 << "UniversalExceptionRaise " << kSystemCrashReporterServiceName; | 247 << "UniversalExceptionRaise " << kSystemCrashReporterServiceName; |
246 } | 248 } |
247 } | 249 } |
248 | 250 |
249 return ExcServerSuccessfulReturnValue(behavior, false); | 251 return ExcServerSuccessfulReturnValue(behavior, false); |
250 } | 252 } |
251 | 253 |
252 } // namespace crashpad | 254 } // namespace crashpad |
OLD | NEW |