From 60b6e74e3fda131add79009ccae2e48e6a460620 Mon Sep 17 00:00:00 2001 From: Alexander Petrov Date: Tue, 19 Jul 2022 18:18:04 +0200 Subject: [PATCH] fix: merge crash annotations instead of overwriting (#34795) ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges annotations provided as argument with global_annotations_, preserving useful information. --- shell/app/electron_crash_reporter_client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/app/electron_crash_reporter_client.cc b/shell/app/electron_crash_reporter_client.cc index 245c55c90a13..237c90c16f33 100644 --- a/shell/app/electron_crash_reporter_client.cc +++ b/shell/app/electron_crash_reporter_client.cc @@ -190,7 +190,9 @@ bool ElectronCrashReporterClient::GetShouldCompressUploads() { void ElectronCrashReporterClient::GetProcessSimpleAnnotations( std::map* annotations) { - *annotations = global_annotations_; + for (auto&& pair : global_annotations_) { + (*annotations)[pair.first] = pair.second; + } (*annotations)["prod"] = ELECTRON_PRODUCT_NAME; (*annotations)["ver"] = ELECTRON_VERSION_STRING; }