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

ggaren at apple.com ggaren at apple.com
Thu Apr 8 02:16:05 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit af289fbf6e1047cbdaa4f87a83fa6bad12ca897f
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 9 04:57:42 2010 +0000

    Switching malloc implementations requires a world rebuild
    https://bugs.webkit.org/show_bug.cgi?id=35899
    
    Reviewed by Maciej Stachowiak.
    
    * wtf/FastMalloc.cpp:
    (WTF::fastCheckConsistency):
    (WTF::TCMallocStats::fastCheckConsistency):
    * wtf/FastMalloc.h:
    * wtf/ValueCheck.h:
    (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp,
    so you can switch malloc implementations without rebuilding the world.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 67a96b8..467387b 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-08  Geoffrey Garen  <ggaren at apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        Switching malloc implementations requires a world rebuild
+        https://bugs.webkit.org/show_bug.cgi?id=35899
+
+        * wtf/FastMalloc.cpp:
+        (WTF::fastCheckConsistency):
+        (WTF::TCMallocStats::fastCheckConsistency):
+        * wtf/FastMalloc.h:
+        * wtf/ValueCheck.h:
+        (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp,
+        so you can switch malloc implementations without rebuilding the world.
+
 2010-03-07  Oliver Hunt  <oliver at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index a168b14..375f395 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -228,14 +228,14 @@ __ZN3JSC6JSLockC1EPNS_9ExecStateE
 __ZN3JSC6Parser5parseEPNS_12JSGlobalDataEPiPNS_7UStringE
 __ZN3JSC7CStringD1Ev
 __ZN3JSC7CStringaSERKS0_
-__ZN3JSC7JSArrayC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE
-__ZN3JSC7JSArrayD2Ev
 __ZN3JSC7JSArray12markChildrenERNS_9MarkStackE
 __ZN3JSC7JSArray15setSubclassDataEPv
 __ZN3JSC7JSArray4infoE
 __ZN3JSC7JSArray9setLengthEj
 __ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE
 __ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE
+__ZN3JSC7JSArrayC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE
+__ZN3JSC7JSArrayD2Ev
 __ZN3JSC7Profile10restoreAllEv
 __ZN3JSC7Profile5focusEPKNS_11ProfileNodeE
 __ZN3JSC7Profile7excludeEPKNS_11ProfileNodeE
@@ -327,6 +327,7 @@ __ZN3WTF16fastZeroedMallocEm
 __ZN3WTF18dateToDaysFrom1970Eiii
 __ZN3WTF18monthFromDayInYearEib
 __ZN3WTF19initializeThreadingEv
+__ZN3WTF20fastCheckConsistencyEPKv
 __ZN3WTF20fastMallocStatisticsEv
 __ZN3WTF21RefCountedLeakCounter16suppressMessagesEPKc
 __ZN3WTF21RefCountedLeakCounter24cancelMessageSuppressionEPKc
diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp
index 7a1ffb6..0ec5bbc 100644
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@ -208,6 +208,12 @@ TryMallocReturnValue tryFastZeroedMalloc(size_t n)
 #include "brew/SystemMallocBrew.h"
 #endif
 
+#if OS(DARWIN)
+#include <malloc/malloc.h>
+#elif COMPILER(MSVC)
+#include <malloc.h>
+#endif
+
 namespace WTF {
 
 TryMallocReturnValue tryFastMalloc(size_t n) 
@@ -373,6 +379,17 @@ FastMallocStatistics fastMallocStatistics()
     return statistics;
 }
 
+void fastCheckConsistency(const void* p)
+{
+#if (defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) || !defined(NDEBUG)
+#if OS(DARWIN)
+        ASSERT(malloc_size(p));
+#elif COMPILER(MSVC)
+        ASSERT(_msize(const_cast<P*>(p)));
+#endif
+#endif
+}
+
 } // namespace WTF
 
 #if OS(DARWIN)
@@ -4449,6 +4466,10 @@ FastMallocStatistics fastMallocStatistics()
     return statistics;
 }
 
+void fastCheckConsistency(const void*)
+{
+}
+
 } // namespace WTF
 #endif
 
diff --git a/JavaScriptCore/wtf/FastMalloc.h b/JavaScriptCore/wtf/FastMalloc.h
index 74d4307..78ecb8d 100644
--- a/JavaScriptCore/wtf/FastMalloc.h
+++ b/JavaScriptCore/wtf/FastMalloc.h
@@ -34,6 +34,7 @@ namespace WTF {
     void* fastCalloc(size_t numElements, size_t elementSize);
     void* fastRealloc(void*, size_t);
     char* fastStrDup(const char*);
+    void fastCheckConsistency(const void*);
 
     struct TryMallocReturnValue {
         TryMallocReturnValue(void* data)
diff --git a/JavaScriptCore/wtf/ValueCheck.h b/JavaScriptCore/wtf/ValueCheck.h
index cd321b8..63ea2bd 100644
--- a/JavaScriptCore/wtf/ValueCheck.h
+++ b/JavaScriptCore/wtf/ValueCheck.h
@@ -26,12 +26,7 @@
 #ifndef ValueCheck_h
 #define ValueCheck_h
 
-// For malloc_size and _msize.
-#if OS(DARWIN)
-#include <malloc/malloc.h>
-#elif COMPILER(MSVC)
-#include <malloc.h>
-#endif
+#include <wtf/FastMalloc.h>
 
 namespace WTF {
 
@@ -47,13 +42,7 @@ template<typename P> struct ValueCheck<P*> {
     {
         if (!p)
             return;
-#if (defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) || !defined(NDEBUG)
-#if OS(DARWIN)
-        ASSERT(malloc_size(p));
-#elif COMPILER(MSVC)
-        ASSERT(_msize(const_cast<P*>(p)));
-#endif
-#endif
+        fastCheckConsistency(p);
         ValueCheck<P>::checkConsistency(*p);
     }
 };

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list