Index: sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
index 3303a0dedf403dccf19b96a06784776d2a0ab20a..bd7647ae8fa519d00d31f44a4f7a2a094719cf6b 100644 |
--- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
@@ -262,7 +262,7 @@ class JSArray<E> implements List<E> { |
String toString() => Collections.collectionToString(this); |
- List<E> toList({ bool growable: false }) => |
+ List<E> toList({ bool growable: true }) => |
new List<E>.from(this, growable: growable); |
Set<E> toSet() => new Set<E>.from(this); |
@@ -279,9 +279,9 @@ class JSArray<E> implements List<E> { |
int get length => JS('int', r'#.length', this); |
void set length(int newLength) { |
- checkGrowable(this, 'set length'); |
if (newLength is !int) throw new ArgumentError(newLength); |
if (newLength < 0) throw new RangeError.value(newLength); |
+ checkGrowable(this, 'set length'); |
JS('void', r'#.length = #', this, newLength); |
} |