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

Unified Diff: src/date.h

Issue 1545883003: Fix 'illegal access' in Date constructor edge case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch back to the original JS limit, which is now vindicated, with additional tests Created 5 years 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 | test/mjsunit/regress/regress-4640.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.h
diff --git a/src/date.h b/src/date.h
index 813e5b83c0bb763d2cd338cccf4d7c1464e3ad63..035ead6d48453aa0eecf35f90f5541e0144f86b8 100644
--- a/src/date.h
+++ b/src/date.h
@@ -18,6 +18,7 @@ class DateCache {
static const int kMsPerMin = 60 * 1000;
static const int kSecPerDay = 24 * 60 * 60;
static const int64_t kMsPerDay = kSecPerDay * 1000;
+ static const int64_t kMsPerMonth = kMsPerDay * 30;
// The largest time that can be passed to OS date-time library functions.
static const int kMaxEpochTimeInSec = kMaxInt;
@@ -30,8 +31,7 @@ class DateCache {
// Conservative upper bound on time that can be stored in JSDate
// before UTC conversion.
- static const int64_t kMaxTimeBeforeUTCInMs =
- kMaxTimeInMs + 10 * kMsPerDay;
+ static const int64_t kMaxTimeBeforeUTCInMs = kMaxTimeInMs + kMsPerMonth;
// Sentinel that denotes an invalid local offset.
static const int kInvalidLocalOffsetInMs = kMaxInt;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4640.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698