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

Unified Diff: src/date.cc

Issue 2813863002: Reland of [date] Add ICU backend for timezone info behind a flag (Closed)
Patch Set: Skip tests on noi18n Created 3 years, 8 months 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 | « src/date.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.cc
diff --git a/src/date.cc b/src/date.cc
index 6471bdb00af5074f20e71805cada1101b5b923b3..41ec17c25a0db2765c9d1333e7c3505ea0c8817f 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,18 @@ 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 ICUTimezoneCache()
+ : base::OS::CreateTimezoneCache()
+#else
+ base::OS::CreateTimezoneCache()
+#endif
+ ) {
+ ResetDateCache();
+}
void DateCache::ResetDateCache() {
static const int kMaxStamp = Smi::kMaxValue;
« no previous file with comments | « src/date.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698