| Index: sdk/lib/collection_dev/list.dart
|
| diff --git a/sdk/lib/collection_dev/list.dart b/sdk/lib/collection_dev/list.dart
|
| index cddc75a762baf32e1a11c10c169e6481cf8cb964..34614f691c5f36e64a6085149b6529a581d79dd9 100644
|
| --- a/sdk/lib/collection_dev/list.dart
|
| +++ b/sdk/lib/collection_dev/list.dart
|
| @@ -273,12 +273,17 @@ abstract class UnmodifiableListBase<E> extends ListBase<E> {
|
| */
|
| class ListIterator<E> implements Iterator<E> {
|
| final List<E> _list;
|
| + final int _initialLength;
|
| int _position;
|
| E _current;
|
|
|
| - ListIterator(List<E> list) : _list = list, _position = -1;
|
| + ListIterator(List<E> list)
|
| + : _list = list, _position = -1, _initialLength = list.length;
|
|
|
| bool moveNext() {
|
| + if (_list.length != _initialLength) {
|
| + throw new ConcurrentModificationError(_list);
|
| + }
|
| int nextPosition = _position + 1;
|
| if (nextPosition < _list.length) {
|
| _current = _list[nextPosition];
|
|
|