Index: tools/dom/src/Serialization.dart |
diff --git a/tools/dom/src/Serialization.dart b/tools/dom/src/Serialization.dart |
index 4db5c0d285bf00e1c854cb4dc5d52908a2b64595..0d1cc82750788db119a4909b1501ea5f78b9bd26 100644 |
--- a/tools/dom/src/Serialization.dart |
+++ b/tools/dom/src/Serialization.dart |
@@ -90,15 +90,15 @@ abstract class _Serializer extends _MessageTraverser { |
int id = _nextFreeRefId++; |
_visited[map] = id; |
- var keys = _serializeList(map.keys); |
- var values = _serializeList(map.values); |
+ var keys = _serializeList(map.keys.toList()); |
+ var values = _serializeList(map.values.toList()); |
// TODO(floitsch): we are losing the generic type. |
return ['map', id, keys, values]; |
} |
_serializeList(List list) { |
int len = list.length; |
- var result = new List(len); |
+ var result = new List.fixedLength(len); |
for (int i = 0; i < len; i++) { |
result[i] = _dispatch(list[i]); |
} |