Index: sdk/lib/_internal/js_runtime/lib/js_array.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart |
index 51a8fb4dc1ee4eb3eeac3bff547ed79dace4ab5e..e3951e74406005f507578fa9ff33aa20af4e9d82 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart |
@@ -150,7 +150,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable { |
E removeLast() { |
checkGrowable('removeLast'); |
- if (length == 0) throw new RangeError.value(-1); |
+ if (length == 0) throw diagnoseIndexError(this, -1); |
return JS('var', r'#.pop()', this); |
} |