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

Unified Diff: src/platform.h

Issue 197023002: Fix a race in initialization of timezone cache in platform-win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix CE Created 6 years, 9 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.cc ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index d42466639e80470772038806bef25b7da05efba3..d087d2397d9bca1adf0a20b38b7a81b56df7498b 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -159,6 +159,9 @@ inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
#endif // V8_NO_FAST_TLS
+class TimezoneCache;
+
+
// ----------------------------------------------------------------------------
// OS
//
@@ -182,18 +185,20 @@ class OS {
// 00:00:00 UTC, January 1, 1970.
static double TimeCurrentMillis();
+ static TimezoneCache* CreateTimezoneCache();
+ static void DisposeTimezoneCache(TimezoneCache* cache);
+ static void ClearTimezoneCache(TimezoneCache* cache);
+
// Returns a string identifying the current time zone. The
// timestamp is used for determining if DST is in effect.
- static const char* LocalTimezone(double time);
+ static const char* LocalTimezone(double time, TimezoneCache* cache);
// Returns the local time offset in milliseconds east of UTC without
// taking daylight savings time into account.
- static double LocalTimeOffset();
+ static double LocalTimeOffset(TimezoneCache* cache);
// Returns the daylight savings offset for the given time.
- static double DaylightSavingsOffset(double time);
-
- static void TimeZoneChanged();
+ static double DaylightSavingsOffset(double time, TimezoneCache* cache);
// Returns last OS error.
static int GetLastError();
« no previous file with comments | « src/date.cc ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698