Also make the date cache's timestamp more robust.
BUG=357362
R=svenpanne@chromium.org
LOG=y
Review URL: https://codereview.chromium.org/
216613003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20323
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
void v8::Date::DateTimeConfigurationChangeNotification(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ if (!i_isolate->IsInitialized()) return;
ON_BAILOUT(i_isolate, "v8::Date::DateTimeConfigurationChangeNotification()",
return);
LOG_API(i_isolate, "Date::DateTimeConfigurationChangeNotification");
void DateCache::ResetDateCache() {
static const int kMaxStamp = Smi::kMaxValue;
- stamp_ = Smi::FromInt(stamp_->value() + 1);
- if (stamp_->value() > kMaxStamp) {
+ if (stamp_->value() >= kMaxStamp) {
stamp_ = Smi::FromInt(0);
+ } else {
+ stamp_ = Smi::FromInt(stamp_->value() + 1);
}
ASSERT(stamp_ != Smi::FromInt(kInvalidStamp));
for (int i = 0; i < kDSTSize; ++i) {