| Index: runtime/lib/date.cc
|
| diff --git a/runtime/lib/date.cc b/runtime/lib/date.cc
|
| index cf92809836bac21d94b09a1861a2534585972dd0..ba9fa95d9117f86178e13ec5bcbba5fedac3152c 100644
|
| --- a/runtime/lib/date.cc
|
| +++ b/runtime/lib/date.cc
|
| @@ -12,13 +12,13 @@
|
|
|
| namespace dart {
|
|
|
| -static int32_t kMaxAllowedSeconds = 2100000000;
|
| +static int64_t kMaxAllowedSeconds = kMaxInt32;
|
|
|
| DEFINE_NATIVE_ENTRY(DateTime_timeZoneName, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(
|
| Integer, dart_seconds, arguments->NativeArgAt(0));
|
| int64_t seconds = dart_seconds.AsInt64Value();
|
| - if (seconds < 0 || seconds > kMaxAllowedSeconds) {
|
| + if (llabs(seconds) > kMaxAllowedSeconds) {
|
| Exceptions::ThrowArgumentError(dart_seconds);
|
| }
|
| const char* name = OS::GetTimeZoneName(seconds);
|
| @@ -30,7 +30,7 @@ DEFINE_NATIVE_ENTRY(DateTime_timeZoneOffsetInSeconds, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(
|
| Integer, dart_seconds, arguments->NativeArgAt(0));
|
| int64_t seconds = dart_seconds.AsInt64Value();
|
| - if (seconds < 0 || seconds > kMaxAllowedSeconds) {
|
| + if (llabs(seconds) > kMaxAllowedSeconds) {
|
| Exceptions::ThrowArgumentError(dart_seconds);
|
| }
|
| int offset = OS::GetTimeZoneOffsetInSeconds(seconds);
|
|
|