Chromium Code Reviews| 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 a4f069d5170c50aab32eac8b2a25e43aaca00470..b61d76caa9563c6b8c2775dd7ac0f5657891bc19 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart |
| @@ -137,8 +137,9 @@ class JSArray<E> implements List<E> { |
| bool every(bool f(E element)) => Collections.every(this, f); |
| - void sort([Comparator<E> compare = Comparable.compare]) { |
| + void sort([int compare(E a, E b)]) { |
| checkMutable(this, 'sort'); |
| + if (!?compare) compare = Comparable.compare; |
|
floitsch
2012/12/05 17:13:02
compare == null
|
| coreSort(this, compare); |
| } |
| @@ -173,7 +174,7 @@ class JSArray<E> implements List<E> { |
| } |
| int get length => JS('int', r'#.length', this); |
| - |
| + |
| void set length(int newLength) { |
| if (newLength is !int) throw new ArgumentError(newLength); |
| if (newLength < 0) throw new RangeError.value(newLength); |