Title: [219732] trunk/Source/WTF
Revision
219732
Author
[email protected]
Date
2017-07-21 09:59:46 -0700 (Fri, 21 Jul 2017)

Log Message

[WTF] Drop initializeDate
https://bugs.webkit.org/show_bug.cgi?id=174714

Reviewed by Darin Adler.

minYear static variable will be initialized in an exclusive manner, which is ensured by C++ "static" semantics.
Thus, we do not need to call initializeDate() explicitly.

* wtf/DateMath.cpp:
(WTF::equivalentYearForDST):
(WTF::initializeDates): Deleted.
* wtf/Threading.cpp:
(WTF::initializeThreading):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (219731 => 219732)


--- trunk/Source/WTF/ChangeLog	2017-07-21 16:41:34 UTC (rev 219731)
+++ trunk/Source/WTF/ChangeLog	2017-07-21 16:59:46 UTC (rev 219732)
@@ -1,5 +1,21 @@
 2017-07-21  Yusuke Suzuki  <[email protected]>
 
+        [WTF] Drop initializeDate
+        https://bugs.webkit.org/show_bug.cgi?id=174714
+
+        Reviewed by Darin Adler.
+
+        minYear static variable will be initialized in an exclusive manner, which is ensured by C++ "static" semantics.
+        Thus, we do not need to call initializeDate() explicitly.
+
+        * wtf/DateMath.cpp:
+        (WTF::equivalentYearForDST):
+        (WTF::initializeDates): Deleted.
+        * wtf/Threading.cpp:
+        (WTF::initializeThreading):
+
+2017-07-21  Yusuke Suzuki  <[email protected]>
+
         [JSC] Introduce static symbols
         https://bugs.webkit.org/show_bug.cgi?id=158863
 

Modified: trunk/Source/WTF/wtf/DateMath.cpp (219731 => 219732)


--- trunk/Source/WTF/wtf/DateMath.cpp	2017-07-21 16:41:34 UTC (rev 219731)
+++ trunk/Source/WTF/wtf/DateMath.cpp	2017-07-21 16:59:46 UTC (rev 219732)
@@ -346,7 +346,7 @@
     // It is ok if the cached year is not the current year as long as the rules
     // for DST did not change between the two years; if they did the app would need
     // to be restarted.
-    static int minYear = minimumYearForDST();
+    static const int minYear { minimumYearForDST() };
     int maxYear = maximumYearForDST();
 
     int difference;
@@ -551,17 +551,6 @@
 #endif
 }
 
-void initializeDates()
-{
-#if !ASSERT_DISABLED
-    static bool alreadyInitialized;
-    ASSERT(!alreadyInitialized);
-    alreadyInitialized = true;
-#endif
-
-    equivalentYearForDST(2000); // Need to call once to initialize a static used in this function.
-}
-
 static inline double ymdhmsToSeconds(int year, long mon, long day, long hour, long minute, double second)
 {
     int mday = firstDayOfMonth[isLeapYear(year)][mon - 1];

Modified: trunk/Source/WTF/wtf/Threading.cpp (219731 => 219732)


--- trunk/Source/WTF/wtf/Threading.cpp	2017-07-21 16:41:34 UTC (rev 219731)
+++ trunk/Source/WTF/wtf/Threading.cpp	2017-07-21 16:59:46 UTC (rev 219732)
@@ -248,7 +248,6 @@
         ThreadHolder::initializeOnce();
         initializeRandomNumberGenerator();
         wtfThreadData();
-        initializeDates();
         Thread::initializePlatformThreading();
     });
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to