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

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

Issue 35173004: "Fix" dart:js tests in IE9 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tests/html/js_test.dart » ('j') | tests/html/js_test.dart » ('J')
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 213a444213765ad768853ced1f4d49e66d7afbf6..852b0dbc4ede6c4830bf080809c8aa81ae1b10d3 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -272,9 +272,12 @@ Object _convertToDart(o) {
JS('bool', 'typeof # == "number"', o) ||
JS('bool', 'typeof # == "boolean"', o)) {
return o;
- } else if (o is Blob || o is DateTime || o is KeyRange
- || o is ImageData || o is Node || o is TypedData) {
- return JS('Blob|DateTime|KeyRange|ImageData|Node|TypedData', '#', o);
+ } else if (o is Blob || o is KeyRange || o is ImageData || o is Node
+ || o is TypedData) {
+ return JS('Blob|KeyRange|ImageData|Node|TypedData', '#', o);
+ } else if (JS('bool', '# instanceof Date', o)) {
+ var ms = JS('num', '#.getMilliseconds()', o);
+ return new DateTime.fromMillisecondsSinceEpoch(ms);
} else if (JS('bool', 'typeof # == "function"', o)) {
return _getDartProxy(o, _DART_CLOSURE_PROPERTY_NAME,
(o) => new JsFunction._fromJs(o));
« no previous file with comments | « no previous file | tests/html/js_test.dart » ('j') | tests/html/js_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698