Index: runtime/lib/typed_data.cc |
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc |
index 2ff65d7c2a0c42e0ac7d21ca58320ef0e00952a8..d7843df679ac7f5f276dfc3671ad8ca2d773ecff 100644 |
--- a/runtime/lib/typed_data.cc |
+++ b/runtime/lib/typed_data.cc |
@@ -25,9 +25,7 @@ static void RangeCheck(intptr_t offset_in_bytes, |
"index (%" Pd ") must be in the range [0..%" Pd ")", |
(offset_in_bytes + access_size) / element_size_in_bytes, |
(length_in_bytes / element_size_in_bytes))); |
- const Array& args = Array::Handle(Array::New(1)); |
- args.SetAt(0, error); |
- Exceptions::ThrowByType(Exceptions::kRange, args); |
+ Exceptions::ThrowRangeError(error); |
} |
} |