Browse Source

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 <[email protected]>
trop[bot] 2 years ago
parent
commit
3314f0cbf5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      shell/app/electron_crash_reporter_client.cc

+ 3 - 1
shell/app/electron_crash_reporter_client.cc

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