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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_array.dart

Issue 2467113003: Make EfficientLength extend Iterable. (Closed)
Patch Set: Reverted, prepare to reland. Make new test not break web-testing framework. Created 4 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
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 004127bc9cd29cc1d77ff7447e27194975b7e4f0..447c749282b4ebc4c4280eb7486137c599536e72 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -146,7 +146,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
void insertAll(int index, Iterable<E> iterable) {
checkGrowable('insertAll');
RangeError.checkValueInInterval(index, 0, this.length, "index");
- if (iterable is! EfficientLength) {
+ if (iterable is! EfficientLengthIterable) {
iterable = iterable.toList();
}
int insertionLength = iterable.length;
@@ -463,7 +463,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
void replaceRange(int start, int end, Iterable<E> replacement) {
checkGrowable('replace range');
RangeError.checkValidRange(start, end, this.length);
- if (replacement is! EfficientLength) {
+ if (replacement is! EfficientLengthIterable) {
replacement = replacement.toList();
}
int removeLength = end - start;
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/collection_patch.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698