[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

mrowe at apple.com mrowe at apple.com
Fri Feb 26 22:22:05 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit b1e94f007810b4c0bf23e8044e73b1562f5f7690
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 05:57:24 2010 +0000

    Fix a handful of other leaks seen on the buildbot.
    
    Patch by Gavin Barraclough <barraclough at apple.com> on 2010-02-16
    Reviewed by Mark Rowe.
    
    * runtime/UStringImpl.h:
    (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that
    the correct cleanup takes place.  This function previously featured some code that attempted to
    skip deletion of static UStringImpl's.  Closer inspection revealed that it was in fact equivalent
    to "if (false)", meaning that UStringImpl's which had their final deref performed via this function
    were leaked.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index ef0ca87..f1cdbc7 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-16  Gavin Barraclough  <barraclough at apple.com>
+
+        Reviewed by Mark Rowe.
+
+        Fix a handful of other leaks seen on the buildbot.
+
+        * runtime/UStringImpl.h:
+        (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that
+        the correct cleanup takes place.  This function previously featured some code that attempted to
+        skip deletion of static UStringImpl's.  Closer inspection revealed that it was in fact equivalent
+        to "if (false)", meaning that UStringImpl's which had their final deref performed via this function
+        were leaked.
+
 2010-02-16  Mark Rowe  <mrowe at apple.com>
 
         Reviewed by Gavin Barraclough.
diff --git a/JavaScriptCore/runtime/UStringImpl.h b/JavaScriptCore/runtime/UStringImpl.h
index 906c568..142e01d 100644
--- a/JavaScriptCore/runtime/UStringImpl.h
+++ b/JavaScriptCore/runtime/UStringImpl.h
@@ -346,13 +346,10 @@ private:
 
 inline void UStringOrRopeImpl::deref()
 {
-    m_refCountAndFlags -= s_refCountIncrement;
-    if (!(m_refCountAndFlags & s_refCountMask)) {
-        if (isRope())
-            static_cast<URopeImpl*>(this)->destructNonRecursive();
-        else if (!s_refCountFlagStatic)
-            delete static_cast<UStringImpl*>(this);
-    }
+    if (isRope())
+        static_cast<URopeImpl*>(this)->deref();
+    else
+        static_cast<UStringImpl*>(this)->deref();
 }
 
 bool equal(const UStringImpl*, const UStringImpl*);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list