Use OwnPtr<HTMLParserQuirks> for m_parserQuirks
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2009 22:27:22 +0000 (22:27 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Apr 2009 22:27:22 +0000 (22:27 +0000)
        Reviewed by Geoff Garen.

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::~HTMLParser): Removed unneeded code.
        * html/HTMLParser.h: Made m_parserQuirks an OwnPtr.

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

WebCore/ChangeLog
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLParser.h

index 2f149c2..a833ee4 100644 (file)
@@ -1,5 +1,15 @@
 2009-04-30  David Kilzer  <ddkilzer@apple.com>
 
+        Use OwnPtr<HTMLParserQuirks> for m_parserQuirks
+
+        Reviewed by Geoff Garen.
+
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::~HTMLParser): Removed unneeded code.
+        * html/HTMLParser.h: Made m_parserQuirks an OwnPtr.
+
+2009-04-30  David Kilzer  <ddkilzer@apple.com>
+
         Provide a mechanism to create a quirks delegate for HTMLParser
 
         Reviewed by David Hyatt.
index 3296c4d..b63bc99 100644 (file)
@@ -165,8 +165,6 @@ HTMLParser::~HTMLParser()
     freeBlock();
     if (m_didRefCurrent)
         m_current->deref();
-    if (m_parserQuirks)
-        delete m_parserQuirks;
 }
 
 void HTMLParser::reset()
index 6fb1ad6..d9a94f3 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "QualifiedName.h"
 #include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
 #include <wtf/RefPtr.h>
 #include "HTMLParserErrorCodes.h"
 
@@ -184,7 +185,7 @@ private:
     bool m_handlingResidualStyleAcrossBlocks;
     int m_inStrayTableContent;
 
-    HTMLParserQuirks* m_parserQuirks;
+    OwnPtr<HTMLParserQuirks> m_parserQuirks;
 };
 
 }