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

Unified Diff: runtime/lib/array_patch.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
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array_patch.dart
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index e62524bd124ddd79fcfd779bc7d7705b34878322..f8343941905d1ddb2c5d28e186722763f1c4d648 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -33,7 +33,7 @@ const _GROWABLE_ARRAY_MARKER = const _GrowableArrayMarker();
}
@patch factory List.from(Iterable elements, { bool growable: true }) {
- if (elements is EfficientLength) {
+ if (elements is EfficientLengthIterable) {
int length = elements.length;
var list = growable ? new _GrowableList<E>(length) : new _List<E>(length);
if (length > 0) { // Avoid creating iterator unless necessary.
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698