Skip to content

Commit

Permalink
fix: merge crash annotations instead of overwriting (#35262)
Browse files Browse the repository at this point in the history
ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges
annotations provided as argument with global_annotations_,
preserving useful information.

Co-authored-by: Alexander Petrov <zowers+github@zowers.net>
  • Loading branch information
trop[bot] and zowers committed Aug 8, 2022
1 parent 3b683c1 commit eeb3f50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shell/app/electron_crash_reporter_client.cc
Expand Up @@ -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;
}
Expand Down

0 comments on commit eeb3f50

Please sign in to comment.