Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d549b251 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Prevent use of invalidated iterator

If the underlying container changes, such as by deleting an element from
it, all of the outstanding iterators get invalidated.

Currently in EventHub, we are using a for loop to go through the entire
map, and deleting the map contents from inside this loop.

To avoid this, do not store the iterators explicitly.

Bug: 163171599
Test: atest inputflinger_tests:EventHubTest#InputEvent_TimestampIsMonotonic
Test: atest inputflinger_tests
Change-Id: I3af0721d54cc03668a68848f6f690a2d523e809b
parent 519ee81e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment