[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d

zoltan at webkit.org zoltan at webkit.org
Thu Dec 3 13:46:18 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 586d08311a2d10cefb8dcc3d77d1f3323c2019e7
Author: zoltan at webkit.org <zoltan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 28 10:31:18 2009 +0000

    2009-11-28  Zoltan Herczeg  <zherczeg at inf.u-szeged.hu>
    
            Reviewed by Gavin Barraclough.
    
            https://bugs.webkit.org/show_bug.cgi?id=31930
    
            Seems a typo. We don't need ~270k memory to determine the vptrs.
    
            * runtime/JSGlobalData.cpp:
            (JSC::VPtrSet::VPtrSet):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51457 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index f23c80b..36ac101 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-28  Zoltan Herczeg  <zherczeg at inf.u-szeged.hu>
+
+        Reviewed by Gavin Barraclough.
+
+        https://bugs.webkit.org/show_bug.cgi?id=31930
+
+        Seems a typo. We don't need ~270k memory to determine the vptrs.
+
+        * runtime/JSGlobalData.cpp:
+        (JSC::VPtrSet::VPtrSet):
+
 2009-11-27  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Unreviewed. 
diff --git a/JavaScriptCore/runtime/JSGlobalData.cpp b/JavaScriptCore/runtime/JSGlobalData.cpp
index 0a7bd69..67cb1e5 100644
--- a/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -90,26 +90,28 @@ struct VPtrSet {
 
 VPtrSet::VPtrSet()
 {
-    // Bizarrely, calling fastMalloc here is faster than allocating space on the stack.
-    void* storage = fastMalloc(sizeof(CollectorBlock));
+    CollectorCell cell;
+    void* storage = &cell;
 
+    ASSERT(sizeof(JSArray) <= sizeof(CollectorCell));
     JSCell* jsArray = new (storage) JSArray(JSArray::createStructure(jsNull()));
     jsArrayVPtr = jsArray->vptr();
     jsArray->~JSCell();
 
+    ASSERT(sizeof(JSByteArray) <= sizeof(CollectorCell));
     JSCell* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
     jsByteArrayVPtr = jsByteArray->vptr();
     jsByteArray->~JSCell();
 
+    ASSERT(sizeof(JSString) <= sizeof(CollectorCell));
     JSCell* jsString = new (storage) JSString(JSString::VPtrStealingHack);
     jsStringVPtr = jsString->vptr();
     jsString->~JSCell();
 
+    ASSERT(sizeof(JSFunction) <= sizeof(CollectorCell));
     JSCell* jsFunction = new (storage) JSFunction(JSFunction::createStructure(jsNull()));
     jsFunctionVPtr = jsFunction->vptr();
     jsFunction->~JSCell();
-
-    fastFree(storage);
 }
 
 JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list