Darin found what appears to be the real leak that we were falsely blaming
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2004 19:48:37 +0000 (19:48 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2004 19:48:37 +0000 (19:48 +0000)
        on the 'leaks' tool (3880245). I made the change, and ran layout tests and PLT to make
        sure nothing barfed.

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        call clearProperties() instead of just setting numParsedProperties to 0
        (CSSParser::parseDeclaration):
        ditto
        (CSSParser::createStyleDeclaration):
        ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/cssparser.cpp

index a235e2124afdecdcbf3349fbdc84ab372bf6a3b4..498486aee9f008994fc485474af974d44bbdb67d 100644 (file)
@@ -1,3 +1,17 @@
+2004-12-06  John Sullivan  <sullivan@apple.com>
+
+        Darin found what appears to be the real leak that we were falsely blaming
+        on the 'leaks' tool (3880245). I made the change, and ran layout tests and PLT to make
+        sure nothing barfed.
+
+        * khtml/css/cssparser.cpp:
+        (CSSParser::parseValue):
+        call clearProperties() instead of just setting numParsedProperties to 0
+        (CSSParser::parseDeclaration):
+        ditto
+        (CSSParser::createStyleDeclaration):
+        ditto
+
 2004-12-06  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by me
index f149328c9963c1842890d6031bad0242e4d99eed..418f763dcb22619b0a993157b54b1d1fe951dad2 100644 (file)
@@ -224,7 +224,7 @@ bool CSSParser::parseValue( CSSMutableStyleDeclarationImpl *declaration, int _id
     if ( numParsedProperties ) {
        ok = true;
         declaration->addParsedProperties(parsedProperties, numParsedProperties);
-       numParsedProperties = 0;
+        clearProperties();
     }
 
     return ok;
@@ -303,7 +303,7 @@ bool CSSParser::parseDeclaration( CSSMutableStyleDeclarationImpl *declaration, c
     if ( numParsedProperties ) {
        ok = true;
         declaration->addParsedProperties(parsedProperties, numParsedProperties);
-       numParsedProperties = 0;
+        clearProperties();
     }
 
     return ok;
@@ -328,7 +328,7 @@ void CSSParser::addProperty( int propId, CSSValueImpl *value, bool important )
 CSSMutableStyleDeclarationImpl *CSSParser::createStyleDeclaration( CSSStyleRuleImpl *rule )
 {
     CSSMutableStyleDeclarationImpl *result = new CSSMutableStyleDeclarationImpl(rule, parsedProperties, numParsedProperties);
-    numParsedProperties = 0;
+    clearProperties();
     return result;
 }