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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 10832166: Updated VM and JS versions of Date to allow underflow and overflow. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 4 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 | runtime/lib/date_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index 447a04cc0365b9f62552b81cd4945b85611f1afe..685226a4c9f969cbe9ca0704336a9feab31afc4d 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -438,24 +438,11 @@ class Primitives {
milliseconds, isUtc) {
checkInt(years);
checkInt(month);
- if (month < 1 || 12 < month) throw new IllegalArgumentException(month);
checkInt(day);
- if (day < 1 || 31 < day) throw new IllegalArgumentException(day);
checkInt(hours);
- if (hours < 0 || 24 < hours) throw new IllegalArgumentException(hours);
checkInt(minutes);
- if (minutes < 0 || 59 < minutes) {
- throw new IllegalArgumentException(minutes);
- }
checkInt(seconds);
- if (seconds < 0 || 59 < seconds) {
- // TODO(ahe): Leap seconds?
- throw new IllegalArgumentException(seconds);
- }
checkInt(milliseconds);
- if (milliseconds < 0 || 999 < milliseconds) {
- throw new IllegalArgumentException(milliseconds);
- }
checkBool(isUtc);
var jsMonth = month - 1;
var value;
« no previous file with comments | « no previous file | runtime/lib/date_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698