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

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

Issue 180723004: Use Date.getTime instead of Date.getMilliseconds in dart:js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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/lib/js/datetime_roundtrip_test.dart » ('j') | tests/lib/lib.status » ('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 54ac866a3480ad6d96f107512805b794adc42367..cda541dfc9cd14d9a661701a8fad78e2255a6dec 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -534,7 +534,7 @@ Object _convertToDart(o) {
// long line: dart2js doesn't allow string concatenation in the JS() form
return JS('Blob|Event|KeyRange|ImageData|Node|TypedData|Window', '#', o);
} else if (JS('bool', '# instanceof Date', o)) {
- var ms = JS('num', '#.getMilliseconds()', o);
+ var ms = JS('num', '#.getTime()', o);
return new DateTime.fromMillisecondsSinceEpoch(ms);
} else if (JS('bool', '#.constructor === #', o, _dartProxyCtor)) {
return JS('', '#.o', o);
« no previous file with comments | « no previous file | tests/lib/js/datetime_roundtrip_test.dart » ('j') | tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698