| Index: sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
|
| diff --git a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
|
| index 7769b46b4923f3af8369eeae22b418905e6288e9..84b25bc52c1d630b83202a160314f1c34bb2b4ba 100644
|
| --- a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
|
| +++ b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
|
| @@ -447,8 +447,11 @@ class NativeTypedData implements TypedData {
|
|
|
| void _invalidIndex(int index, int length) {
|
| if (index < 0 || index >= length) {
|
| - if (length == this.length) {
|
| - throw new RangeError.index(index, this);
|
| + if (this is List) {
|
| + var list = this; // Typed as dynamic to avoid warning.
|
| + if (length == list.length) {
|
| + throw new RangeError.index(index, this);
|
| + }
|
| }
|
| throw new RangeError.range(index, 0, length - 1);
|
| } else {
|
|
|