Reviewed by Tim Hatcher.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 04:48:40 +0000 (04:48 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 04:48:40 +0000 (04:48 +0000)
commit05f8466449f0ca8dcbfddb0ab50676dbcd5bf66e
tree7d95e03c489f42f4e5678ee1dacca830275f9a65
parent4a623088ffa00f30bd1701729319db368f2268f5
    Reviewed by Tim Hatcher.

        - fix 26 Node leaks on fast/dom tests

        * dom/Document.cpp:
        (WebCore::Document::removedLastRef): delete tokenizer - if we are still parsing at this point, we don't
        want nodes held by the parser to keep the document alive.
        * html/HTMLParser.cpp:
        (WebCore::RefNonDocNodePtr::RefNonDocNodePtr): Smart pointer that acts like RefPtr for Node,
        but avoids refing document nodes to avoid cycles.
        (WebCore::RefNonDocNodePtr::~RefNonDocNodePtr):
        (WebCore::RefNonDocNodePtr::get):
        (WebCore::RefNonDocNodePtr::operator*):
        (WebCore::RefNonDocNodePtr::operator->):
        (WebCore::RefNonDocNodePtr::operator!):
        (WebCore::RefNonDocNodePtr::operator UnspecifiedBoolType):
        (WebCore::RefNonDocNodePtr::operator=):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::HTMLStackElem): Use a RefNonDocNodePtr instead of RefPtr<Node>
        (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Use a RefPtr here to avoid crashing

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/html/HTMLParser.cpp