Chromium Code Reviews| Index: src/date.cc |
| diff --git a/src/date.cc b/src/date.cc |
| index d0ff192b6ad16b05f6bf9e5b652aef17f173f1da..d7eb2d3dccdc8b526794b9979320c11268cb1790 100644 |
| --- a/src/date.cc |
| +++ b/src/date.cc |
| @@ -7,6 +7,10 @@ |
| #include "src/objects.h" |
| #include "src/objects-inl.h" |
| +#ifdef V8_I18N_SUPPORT |
| +#include "src/i18n.h" |
| +#endif |
| + |
| namespace v8 { |
| namespace internal { |
| @@ -21,6 +25,15 @@ static const int kYearsOffset = 400000; |
| static const char kDaysInMonths[] = |
| {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; |
| +DateCache::DateCache() |
| + : stamp_(0), |
| + tz_cache_( |
| +#ifdef V8_I18N_SUPPORT |
| + FLAG_icu_timezone_data ? new ICUOSTimezoneCache() : |
|
ulan
2017/03/03 13:20:27
nit: let's keep the conditionals properly nested.
Dan Ehrenberg
2017/03/03 15:06:54
Done.
|
| +#endif |
| + base::OS::CreateTimezoneCache()) { |
| + ResetDateCache(); |
| +} |
| void DateCache::ResetDateCache() { |
| static const int kMaxStamp = Smi::kMaxValue; |