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

ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges
annotations provided as argument with global_annotations_,
preserving useful information.

Co-authored-by: Alexander Petrov <zowers+github@zowers.net>
This commit is contained in:
trop[bot]
2022-08-08 21:57:43 +02:00
committed by GitHub
parent 05bf827fc0
commit 3314f0cbf5

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;
}