Index: lib/compiler/implementation/lib/mockimpl.dart |
diff --git a/lib/compiler/implementation/lib/mockimpl.dart b/lib/compiler/implementation/lib/mockimpl.dart |
index 08648b963210d8818313dab8ad876dd86f21a81e..b6f18055e7e65737ee6033ffd3f0a97f538179ab 100644 |
--- a/lib/compiler/implementation/lib/mockimpl.dart |
+++ b/lib/compiler/implementation/lib/mockimpl.dart |
@@ -243,8 +243,12 @@ class DateImplementation implements Date { |
} |
} |
+ static final int _MAX_VALUE = 8640000000000000; |
+ |
DateImplementation.fromEpoch(this.value, [bool isUtc = false]) |
- : _isUtc = checkNull(isUtc); |
+ : _isUtc = checkNull(isUtc) { |
+ if (value.abs() > _MAX_VALUE) throw new IllegalArgumentException(value); |
+ } |
bool operator ==(other) { |
if (!(other is DateImplementation)) return false; |