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

Unified Diff: sdk/lib/js/dart2js/js_dart2js.dart

Issue 438503003: Fix js test for firefox now that null becomes 'null' and not 'undefined' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/js/dart2js/js_dart2js.dart
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 8e1b371f69cde75c37ddbdf5af83a8bb82c68d08..9bf0a20f04354b046b3ddb49833412b3734116e6 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -455,7 +455,8 @@ class JsArray<E> extends JsObject with ListMixin<E> {
}
void sort([int compare(E a, E b)]) {
- callMethod('sort', [compare]);
+ // Note: arr.sort(null) is a type error in FF
+ callMethod('sort', compare == null ? [] : [compare]);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698