mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
Properly update iterator
Bug: 325296797 Change-Id: I39f76519c46804ad663172abf91ef582bde135e7 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5310754 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
parent
29ac83caeb
commit
37afd37401
@ -99,9 +99,11 @@ ModuleSnapshotSanitized::AnnotationsSimpleMap() const {
|
||||
std::map<std::string, std::string> annotations =
|
||||
snapshot_->AnnotationsSimpleMap();
|
||||
if (allowed_annotations_) {
|
||||
for (auto kv = annotations.begin(); kv != annotations.end(); ++kv) {
|
||||
if (!KeyIsAllowed(kv->first, *allowed_annotations_)) {
|
||||
annotations.erase(kv);
|
||||
for (auto kv = annotations.begin(); kv != annotations.end();) {
|
||||
if (KeyIsAllowed(kv->first, *allowed_annotations_)) {
|
||||
++kv;
|
||||
} else {
|
||||
kv = annotations.erase(kv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user