Reviewed by Dave Harrison.
authortomernic <tomernic@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2006 22:05:33 +0000 (22:05 +0000)
committertomernic <tomernic@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2006 22:05:33 +0000 (22:05 +0000)
commit24ede9911843aabad337b612cad12273ed1d57d1
treef139487914d87a4ac02eeaedc981c14a033350a8
parent70df2dc03c740d7c7f066b6f6b5fd67865ba13de
    Reviewed by Dave Harrison.

        <rdar://problem/4339024>
        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6785> "Fix for possible leak of applet, object, or embed
        (and plugin view)"

        * khtml/html/html_objectimpl.cpp:
        (WebCore::HTMLAppletElementImpl::~HTMLAppletElementImpl):
        Assert that appletInstance has been deleted by detach().
        (WebCore::HTMLAppletElementImpl::detach):
        Delete appletInstance, because it references the widget owned by the renderer we're about to destroy.
        It is assumed elsewhere (getRuntimeObject(), kjs_dom.cpp) that the instance is owned by the applet
        element.  Therefore, it is required that the element destroy the instance in its tear-down phase.
        (WebCore::HTMLEmbedElementImpl::~HTMLEmbedElementImpl):
        Assert that embedInstance has been deleted by detach().
        (WebCore::HTMLEmbedElementImpl::detach):
        Delete embedInstance, same reason.  This is the one that fixes <rdar://problem/4339024>.
        (WebCore::HTMLObjectElementImpl::~HTMLObjectElementImpl):
        Assert that objectInstance has been deleted by detach().
        (WebCore::HTMLObjectElementImpl::detach):
        Delete embedInstance, same reason.
        * khtml/html/html_objectimpl.h:
        Declared HTMLAppletElementImpl::detach() and HTMLEmbedElementImpl::detach().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/khtml/html/html_objectimpl.cpp
WebCore/khtml/html/html_objectimpl.h