commit | 7e251273880c4108bc56b4cdc52f6193876ef59a | [log] [tgz] |
---|---|---|
author | Jason Simmons <jsimmons@google.com> | Thu Oct 25 15:58:43 2012 -0700 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Nov 01 16:33:50 2012 -0700 |
tree | 85f5222635ac299c05afa458d30d9d3d28cf6632 | |
parent | 446ba53792356350f4e9d5cbd796f020da44b0c7 [diff] |
Ensure that Vector::erase() returns a valid iterator Vector::erase may reallocate the Vector's storage while removing an element. However, erase() calls begin() before calling removeItemsAt(), thus caching a pointer the the Vector's old storage. If the storage is reallocated, the iterator returned by erase() will be based on the old storage pointer and will thus be invalid. Bug: 7433283 Change-Id: I91980e0fcb5a2e0a55f1a78444a5958037afdbed