Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 61ee9a12246e1959c075231d6ceb312d7f298602..16e03e7548ff22e5537731b232d10fe4446d69e2 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -378,18 +378,18 @@ void JSDate::JSDateVerify() { |
if (value()->IsHeapObject()) { |
VerifyHeapPointer(value()); |
} |
- if (local()->IsHeapObject()) { |
- VerifyHeapPointer(local()); |
- } |
CHECK(value()->IsUndefined() || value()->IsSmi() || value()->IsHeapNumber()); |
- CHECK(local()->IsUndefined() || local()->IsSmi() || local()->IsHeapNumber()); |
CHECK(year()->IsUndefined() || year()->IsSmi() || year()->IsNaN()); |
CHECK(month()->IsUndefined() || month()->IsSmi() || month()->IsNaN()); |
CHECK(day()->IsUndefined() || day()->IsSmi() || day()->IsNaN()); |
+ CHECK(weekday()->IsUndefined() || weekday()->IsSmi() || weekday()->IsNaN()); |
CHECK(hour()->IsUndefined() || hour()->IsSmi() || hour()->IsNaN()); |
CHECK(min()->IsUndefined() || min()->IsSmi() || min()->IsNaN()); |
CHECK(sec()->IsUndefined() || sec()->IsSmi() || sec()->IsNaN()); |
- CHECK(weekday()->IsUndefined() || weekday()->IsSmi() || weekday()->IsNaN()); |
+ CHECK(cache_stamp()->IsUndefined() || |
+ cache_stamp()->IsSmi() || |
+ cache_stamp()->IsNaN()); |
+ |
if (month()->IsSmi()) { |
int month = Smi::cast(this->month())->value(); |
CHECK(0 <= month && month <= 11); |
@@ -414,6 +414,10 @@ void JSDate::JSDateVerify() { |
int weekday = Smi::cast(this->weekday())->value(); |
CHECK(0 <= weekday && weekday <= 6); |
} |
+ if (cache_stamp()->IsSmi()) { |
+ CHECK(Smi::cast(cache_stamp())->value() <= |
+ Smi::cast(Isolate::Current()->date_cache()->stamp())->value()); |
+ } |
} |