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

Unified Diff: third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart

Issue 25931003: Make List.shuffle take an optional Random object to use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 2 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
« no previous file with comments | « third_party/pkg/js/lib/js_wrapping.dart ('k') | tools/dom/src/ImmutableListMixin.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart
diff --git a/third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart b/third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart
index 617377489183f60b909992e6c39d1dd2c785faf8..6244223e17bf88f39d7726885c7d17299825739a 100644
--- a/third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart
+++ b/third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart
@@ -52,8 +52,8 @@ class JsArrayToListAdapter<E> extends TypedProxy /*with ListMixin<E>*/ implement
final sortedList = _asList()..sort(compare);
setRange(0, sortedList.length, sortedList);
}
- @override void shuffle() {
- final shuffledList = _asList()..shuffle();
+ @override void shuffle([Random random]) {
+ final shuffledList = _asList()..shuffle(random);
setRange(0, shuffledList.length, shuffledLength);
}
@override void insert(int index, E element) {
« no previous file with comments | « third_party/pkg/js/lib/js_wrapping.dart ('k') | tools/dom/src/ImmutableListMixin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698