Index: sdk/lib/typed_data/dart2js/native_typed_data_dart2js.dart |
diff --git a/sdk/lib/typed_data/dart2js/native_typed_data_dart2js.dart b/sdk/lib/typed_data/dart2js/native_typed_data_dart2js.dart |
index 17a61b65e77a51285b63a7536b6674c27694aee3..efc4957196584465b59791f1116544c1b9e1514c 100644 |
--- a/sdk/lib/typed_data/dart2js/native_typed_data_dart2js.dart |
+++ b/sdk/lib/typed_data/dart2js/native_typed_data_dart2js.dart |
@@ -79,7 +79,8 @@ class NativeTypedData implements TypedData native "ArrayBufferView" { |
} |
void _checkIndex(int index, int length) { |
- if (JS('bool', '(# >>> 0 != #)', index, index) || index >= length) { |
+ if (JS('bool', '(# >>> 0) !== #', index, index) || |
+ JS('int', '#', index) >= length) { // 'int' guaranteed by above test. |
_invalidIndex(index, length); |
} |
} |