Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_array.dart

Issue 1318943005: Update range errors to agree on the numbers. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: More tests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/js_runtime/lib/js_array.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart
index 51a8fb4dc1ee4eb3eeac3bff547ed79dace4ab5e..1bca949aeb7388b230b1f04b211aa6739fd222f0 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -351,14 +351,14 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
checkNull(start); // TODO(ahe): This is not specified but co19 tests it.
if (start is !int) throw argumentErrorValue(start);
if (start < 0 || start > length) {
- throw new RangeError.range(start, 0, length);
+ throw new RangeError.range(start, 0, length, "start");
}
if (end == null) {
end = length;
} else {
if (end is !int) throw argumentErrorValue(end);
if (end < start || end > length) {
- throw new RangeError.range(end, start, length);
+ throw new RangeError.range(end, start, length, "end");
}
}
if (start == end) return <E>[];

Powered by Google App Engine
This is Rietveld 408576698