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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerated html files. Created 8 years, 1 month 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: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index 8b575ed07e4b0ff7195d91c770a73c605a743681..9e70ae27389a99052c7b96cc8a527aa171447bd8 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -300,7 +300,7 @@ index$slow(var a, var index) {
if (!identical(index.truncate(), index)) throw new ArgumentError(index);
}
if (index < 0 || index >= a.length) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError.value(index);
}
return JS('Object', r'#[#]', a, index);
}
@@ -313,7 +313,7 @@ void indexSet$slow(var a, var index, var value) {
throw new ArgumentError(index);
}
if (index < 0 || index >= a.length) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError.value(index);
}
checkMutable(a, 'indexed set');
JS('Object', r'#[#] = #', a, index, value);
@@ -729,7 +729,7 @@ iae(argument) {
* access.
*/
ioore(index) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError.value(index);
}
listInsertRange(receiver, start, length, initialValue) {
@@ -744,7 +744,7 @@ listInsertRange(receiver, start, length, initialValue) {
var receiverLength = JS('num', r'#.length', receiver);
if (start < 0 || start > receiverLength) {
- throw new IndexOutOfRangeException(start);
+ throw new RangeError.value(start);
}
receiver.length = receiverLength + length;
Arrays.copy(receiver,
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/compiler/implementation/lib/string_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698