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

Unified Diff: dart/frog/leg/lib/js_helper.dart

Issue 9835089: Prevent sort on immutable lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Temporary interceptor for copyFrom$4 Created 8 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
« no previous file with comments | « no previous file | dart/tests/corelib/corelib-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/lib/js_helper.dart
diff --git a/dart/frog/leg/lib/js_helper.dart b/dart/frog/leg/lib/js_helper.dart
index ca78471a909b3163ed3598c2f1b89b0d453dd6d8..b83a9667c36e1495b73da90f60a9a8cea85b3c8b 100644
--- a/dart/frog/leg/lib/js_helper.dart
+++ b/dart/frog/leg/lib/js_helper.dart
@@ -784,6 +784,7 @@ builtin$every$1(receiver, f) {
builtin$sort$1(receiver, compare) {
if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.sort(compare));
+ checkMutable(receiver, 'sort');
DualPivotQuicksort.sort(receiver, compare);
}
@@ -1363,3 +1364,11 @@ class Null {
throw UnsupportedOperationException('new Null()');
}
}
+
+builtin$copyFrom$4(receiver, arg1, arg2, arg3, arg4) {
+ // TODO(ahe): Remove this method when CL 9839101 has landed.
+ if (!isJsArray(receiver)) {
+ return UNINTERCEPTED(receiver.copyFrom(arg1, arg2, arg3, arg4));
+ }
+ throw new UnsupportedOperationException('copyFrom');
+}
« no previous file with comments | « no previous file | dart/tests/corelib/corelib-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698