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

Unified Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 months 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/web_sql/dart2js/web_sql_dart2js.dart
diff --git a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
index 357592614ff74ad7b3ecfcd4d3162218b6edd5cb..c0df4c96d2c134741bfc5d543a6a8a3641a0d467 100644
--- a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
+++ b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
@@ -427,8 +427,13 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
throw new UnsupportedError("Cannot insertRange on immutable List.");
}
+ List<Map> sublist(int start, [int end]) {
+ if (end == null) end = length;
+ return Lists.getRange(this, start, end, <Map>[]);
+ }
+
List<Map> getRange(int start, int rangeLength) =>
- Lists.getRange(this, start, rangeLength, <Map>[]);
+ sublist(start, start + rangeLength);
Map<int, Map> asMap() =>
IterableMixinWorkaround.asMapList(this);

Powered by Google App Engine
This is Rietveld 408576698