Chromium Code Reviews| Index: runtime/lib/growable_array.dart |
| diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart |
| index d58492e9a7ad69c608550593581e242bc25588b3..770dc15155f2c6413b507fb3d5c32de8bb71e0d8 100644 |
| --- a/runtime/lib/growable_array.dart |
| +++ b/runtime/lib/growable_array.dart |
| @@ -4,6 +4,7 @@ |
| class _GrowableObjectArray<T> implements List<T> { |
| static final int _classId = (new _GrowableObjectArray(0))._cid; |
| + static List _toStringList = new List(); |
| void insert(int index, T element) { |
| if (index < 0 || index > length) { |
| @@ -337,9 +338,16 @@ class _GrowableObjectArray<T> implements List<T> { |
| } |
| String toString() { |
| - return ToString.iterableToString(this); |
| + for(int i = 0; i < _toStringList.length; i++) { |
|
floitsch
2013/07/08 12:00:50
change to IterableMixinWorkaround.toStringList(thi
zarah
2013/07/08 14:35:15
Done.
|
| + if(identical(_toStringList[i], this)) |
| + return '[...]'; |
| + } |
| + _toStringList.add(this); |
| + String result = IterableMixinWorkaround.toStringList(this); |
| + _toStringList.remove(this); |
| + return result; |
| } |
| - |
| + |
| Iterator<T> get iterator { |
| return new ListIterator<T>(this); |
| } |