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

Unified Diff: runtime/lib/growable_array.cc

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
« no previous file with comments | « runtime/lib/byte_array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.cc
diff --git a/runtime/lib/growable_array.cc b/runtime/lib/growable_array.cc
index 8ffd3d25117cbfb9204199ef746ef25eece75ecd..c3b6f5eb183da9b71672647153995e4d1b42cc33 100644
--- a/runtime/lib/growable_array.cc
+++ b/runtime/lib/growable_array.cc
@@ -22,7 +22,7 @@ DEFINE_NATIVE_ENTRY(GrowableObjectArray_allocate, 2) {
const Integer& index = Integer::Handle(Integer::New(data.Length()));
GrowableArray<const Object*> args;
args.Add(&index);
- Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, args);
+ Exceptions::ThrowByType(Exceptions::kRange, args);
}
const GrowableObjectArray& new_array =
GrowableObjectArray::Handle(GrowableObjectArray::New(data));
@@ -38,7 +38,7 @@ DEFINE_NATIVE_ENTRY(GrowableObjectArray_getIndexed, 2) {
if ((index.Value() < 0) || (index.Value() >= array.Length())) {
GrowableArray<const Object*> args;
args.Add(&index);
- Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, args);
+ Exceptions::ThrowByType(Exceptions::kRange, args);
}
const Instance& obj = Instance::CheckedHandle(array.At(index.Value()));
return obj.raw();
@@ -52,7 +52,7 @@ DEFINE_NATIVE_ENTRY(GrowableObjectArray_setIndexed, 3) {
if ((index.Value() < 0) || (index.Value() >= array.Length())) {
GrowableArray<const Object*> args;
args.Add(&index);
- Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, args);
+ Exceptions::ThrowByType(Exceptions::kRange, args);
}
GET_NATIVE_ARGUMENT(Instance, value, arguments->At(2));
array.SetAt(index.Value(), value);
@@ -81,7 +81,7 @@ DEFINE_NATIVE_ENTRY(GrowableObjectArray_setLength, 2) {
if ((length.Value() < 0) || (length.Value() > array.Capacity())) {
GrowableArray<const Object*> args;
args.Add(&length);
- Exceptions::ThrowByType(Exceptions::kIndexOutOfRange, args);
+ Exceptions::ThrowByType(Exceptions::kRange, args);
}
array.SetLength(length.Value());
return Object::null();
« no previous file with comments | « runtime/lib/byte_array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698