Chromium Code Reviews| Index: runtime/lib/typed_data.dart |
| diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart |
| index 04f6fa9b1229889a77989c35b0e30d7336d67f60..2f5fa53fe4e36e8e043174f262c7bab0889c04a3 100644 |
| --- a/runtime/lib/typed_data.dart |
| +++ b/runtime/lib/typed_data.dart |
| @@ -279,6 +279,8 @@ patch class ByteData { |
| // the collection and list interfaces. |
| abstract class _TypedListBase { |
| + static List _toStringList = new List(); |
| + |
| // Method(s) implementing the Collection interface. |
| bool contains(element) => IterableMixinWorkaround.contains(this, element); |
| @@ -505,10 +507,16 @@ abstract class _TypedListBase { |
| // Method(s) implementing Object interface. |
| String toString() { |
|
floitsch
2013/07/08 12:00:50
change to IterableMixinWorkaround.toStringList(thi
zarah
2013/07/08 14:35:15
Done.
|
| - return ToString.iterableToString(this); |
| + for(int i = 0; i < _toStringList.length; i++) { |
| + if(identical(_toStringList[i], this)) |
| + return '[...]'; |
| + } |
| + _toStringList.add(this); |
| + String result = IterableMixinWorkaround.toStringList(this); |
| + _toStringList.remove(this); |
| + return result; |
| } |
| - |
| // Internal utility methods. |
| bool _setRange(int start, int length, Iterable from, int startFrom) |