Chromium Code Reviews| Index: sdk/lib/collection/linked_list.dart |
| diff --git a/sdk/lib/collection/linked_list.dart b/sdk/lib/collection/linked_list.dart |
| index a9c898969429e27cbe854b7cf577c6acfb06c7bc..19817f3875d424e3f5b6f76a0d032b50189612c2 100644 |
| --- a/sdk/lib/collection/linked_list.dart |
| +++ b/sdk/lib/collection/linked_list.dart |
| @@ -14,6 +14,8 @@ part of dart.collection; |
| class LinkedList<E extends LinkedListEntry<E>> |
| extends IterableBase<E> |
| implements _LinkedListLink { |
| + static List _toStringList = new List(); |
| + |
| int _modificationCount = 0; |
| int _length = 0; |
| _LinkedListLink _next; |
| @@ -60,7 +62,16 @@ class LinkedList<E extends LinkedListEntry<E>> |
| Iterator<E> get iterator => new _LinkedListIterator<E>(this); |
| - String toString() => ToString.iterableToString(this); |
| + String toString() { |
| + for(int i = 0; i < _toStringList.length; i++) { |
|
floitsch
2013/07/08 12:00:50
Simple call to IterableMixinWorkaround.
Add TODO t
zarah
2013/07/08 14:35:15
Done.
|
| + if(identical(_toStringList[i], this)) |
| + return '{...}'; |
| + } |
| + _toStringList.add(this); |
| + String result = IterableMixinWorkaround.toStringIterable(this); |
| + _toStringList.remove(this); |
| + return result; |
| + } |
| int get length => _length; |