[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ggaren at apple.com ggaren at apple.com
Wed Apr 7 23:28:10 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 56443775d74675e547e528bad436fedc858647d4
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 10 03:58:29 2009 +0000

    Fixed an edge case that could cause the engine not to notice a timezone
    change.
    
    Reviewed by Oliver Hunt.
    
    No test because this case would require manual intervention to change
    the timezone during the test.
    
    SunSpider reports no change.
    
    * runtime/DateInstanceCache.h:
    (JSC::DateInstanceCache::DateInstanceCache):
    (JSC::DateInstanceCache::reset): Added a helper function for resetting
    this cache. Also, shrank the cache, since we'll be resetting it often.
    
    * runtime/JSGlobalData.cpp:
    (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
    in resetting Date data. (Otherwise, a cache hit could bypass a necessary
    timezone update check.)
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50709 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index ea2c5cb..92e6490 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,27 @@
 2009-11-09  Geoffrey Garen  <ggaren at apple.com>
 
+        Reviewed by Oliver Hunt.
+
+        Fixed an edge case that could cause the engine not to notice a timezone
+        change.
+        
+        No test because this case would require manual intervention to change
+        the timezone during the test.
+        
+        SunSpider reports no change.
+
+        * runtime/DateInstanceCache.h:
+        (JSC::DateInstanceCache::DateInstanceCache):
+        (JSC::DateInstanceCache::reset): Added a helper function for resetting
+        this cache. Also, shrank the cache, since we'll be resetting it often.
+
+        * runtime/JSGlobalData.cpp:
+        (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
+        in resetting Date data. (Otherwise, a cache hit could bypass a necessary
+        timezone update check.)
+
+2009-11-09  Geoffrey Garen  <ggaren at apple.com>
+
         Reviewed by Sam Weinig.
 
         Some manual inlining and constant propogation in Date code.
diff --git a/JavaScriptCore/runtime/DateInstanceCache.h b/JavaScriptCore/runtime/DateInstanceCache.h
index ba478e3..d208580 100644
--- a/JavaScriptCore/runtime/DateInstanceCache.h
+++ b/JavaScriptCore/runtime/DateInstanceCache.h
@@ -56,6 +56,11 @@ namespace JSC {
     public:
         DateInstanceCache()
         {
+            reset();
+        }
+        
+        void reset()
+        {
             for (size_t i = 0; i < cacheSize; ++i)
                 m_cache[i].key = NaN;
         }
@@ -72,7 +77,7 @@ namespace JSC {
         }
 
     private:
-        static const size_t cacheSize = 64;
+        static const size_t cacheSize = 16;
 
         struct CacheEntry {
             double key;
diff --git a/JavaScriptCore/runtime/JSGlobalData.cpp b/JavaScriptCore/runtime/JSGlobalData.cpp
index 97666aa..a149049 100644
--- a/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -256,6 +256,7 @@ void JSGlobalData::resetDateCache()
 {
     cachedUTCOffset = NaN;
     cachedDateString = UString();
+    dateInstanceCache.reset();
 }
 
 void JSGlobalData::startSampling()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list