From eeb3f505e6dc39b8772fb228894f6c70b13608e2 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 21:57:40 +0200 Subject: [PATCH] fix: merge crash annotations instead of overwriting (#35262) ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges annotations provided as argument with global_annotations_, preserving useful information. Co-authored-by: Alexander Petrov --- 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 245c55c90a13a..237c90c16f33a 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; }