Fix AXEventGenerator::Iterator::begin() point to non-empty entry
AXEventGenerator::Iterator iterates over the generated events in std::map<AXNode*, std::set<EventParams>> tree_events_. Often there could be entry with empty event sets (std::set<EventParams) in |tree_events_|, and if these empty event sets happen to be the first entry when we iterate over |tree_events_|, AXEventGenerator::Iterator ::operator++ would increment AXEventGenerator::Iterator::set_iter_ past its end, causing an exception. This CL fixes this issue by making AXEventGenerator::Iterator ::begin() to always point to a non-empty std::set<EventParams> entry in |tree_events_|. AX-Relnotes: n/a Bug: 1120281 Change-Id: I8fbdbbc92eb007d3ce01bfa5cb61730c9f38c115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399560 Commit-Queue: Victor Fei <vicfei@microsoft.com> Reviewed-by:Ian Prest <iapres@microsoft.com> Reviewed-by:
Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#810485}
Showing
Please register or sign in to comment