fix: merge crash annotations instead of overwriting (#34795)

ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges
annotations provided as argument with global_annotations_,
preserving useful information.
This commit is contained in:
Alexander Petrov 2022-07-19 18:18:04 +02:00 committed by GitHub
parent ba25714e16
commit 60b6e74e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,7 +190,9 @@ bool ElectronCrashReporterClient::GetShouldCompressUploads() {
void ElectronCrashReporterClient::GetProcessSimpleAnnotations(
std::map<std::string, std::string>* annotations) {
*annotations = global_annotations_;
for (auto&& pair : global_annotations_) {
(*annotations)[pair.first] = pair.second;
}
(*annotations)["prod"] = ELECTRON_PRODUCT_NAME;
(*annotations)["ver"] = ELECTRON_VERSION_STRING;
}