Chromium Code Reviews| Index: sdk/lib/collection/list.dart |
| diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart |
| index 9b6b753a815db1dd3f729e54e021322f743bfc58..02e4b711e95b03c5db2549b6032849b01dd1980c 100644 |
| --- a/sdk/lib/collection/list.dart |
| +++ b/sdk/lib/collection/list.dart |
| @@ -244,8 +244,12 @@ abstract class ListMixin<E> implements List<E> { |
| } |
| void addAll(Iterable<E> iterable) { |
| + int i = this.length; |
| for (E element in iterable) { |
| - this[this.length++] = element; |
| + assert(this.length == i || (throw new ConcurrentModificationError(this))); |
|
srdjan
2015/08/14 18:00:55
What is the rule with COncurrentModificationErrors
Lasse Reichstein Nielsen
2015/08/14 22:11:01
There is no rule as such.
We have made them checke
|
| + this.length = i + 1; |
| + this[i] = element; |
| + i++; |
| } |
| } |