mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
d822f36f15
The way runtime/platform/hashmap.h:HashMap was implemented so far did not allow deleting elements while iterating over the map. If one iterated like this HashMap::Entry* cursor = map.Start(); while (cursor != NULL) { if (cond) { map.Remove(cursor->key, cursor->hash); } cursor = map.Next(cursor); } Then the iteration `cursor` will skip elements. This is due to the fact that `HashMap::Remove()` is left-rotating elements in certain cases and `HashMap::Next()` will unconditionally advance to the next position in the backing store. PROBLEM IS: There was existing code which did remove elements while iterating over a HashMap. R=fschneider@google.com Review URL: https://codereview.chromium.org/2533303005 . |
||
---|---|---|
.. | ||
address_sanitizer.h | ||
assert.cc | ||
assert.h | ||
c99_support_win.h | ||
floating_point.h | ||
floating_point_win.cc | ||
floating_point_win.h | ||
globals.h | ||
hashmap.cc | ||
hashmap.h | ||
inttypes_support_win.h | ||
math.h | ||
memory_sanitizer.h | ||
platform_headers.gypi | ||
platform_sources.gypi | ||
signal_blocker.h | ||
text_buffer.cc | ||
text_buffer.h | ||
utils.cc | ||
utils.h | ||
utils_android.h | ||
utils_fuchsia.h | ||
utils_linux.h | ||
utils_macos.h | ||
utils_win.h |