Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Sep 2004 06:03:20 +0000 (06:03 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Sep 2004 06:03:20 +0000 (06:03 +0000)
commit7a0062197a8438527bc784da7e80bf6d85f9f8c3
tree0834b51ddd35744c2fac4db4d40ab5af5ea595fc
parent76d8234d822fac0875aa580e7a0fc433abf15dd8
    Reviewed by Maciej.

        - fixed <rdar://problem/3710123> Loading iframe that replaces content in the parent document crashes Safari (Oracle Portal)

        This is a more complete fix, but it requires the previous attempt at a fix for this same
        bug below, because this is only the "don't destroy the KHTMLPart" portion; other fixes are
        still needed to survive shutdown of the part.

        * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::interpreter): Call the new keepAlive method.
        This is called whenever we're about to use an interpreter to run some JavaScript, and
        it's JavaScript that might destroy the part, hence the interpreter.

        * khtml/khtml_part.h: Added keepAlive() and slotEndLifeSupport() member functions.
        * khtml/khtmlpart_p.h: Added m_lifeSupportTimer.
        * khtml/khtml_part.cpp:
        (KHTMLPart::init): Connects m_lifeSupportTimer to slotEndLifeSupport.
        (KHTMLPart::write): Removed old attempt to work around this issue.
        (KHTMLPart::end): Ditto.
        (KHTMLPart::keepAlive): Added. References the part, then sets up a one-shot timer.
        (KHTMLPart::slotEndLifeSupport): Added. Stops the timer and then removes the reference
        from the part, possibly destroying it.

        * kwq/KWQSlot.mm:
        (KWQSlot::KWQSlot): Added the new slot to the list of slots.
        (KWQSlot::call): Ditto.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendResizeEvent): Removed an old attempt to work around this same issue.
        (KWQKHTMLPart::mouseDown): Ditto.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Ditto.
        (KWQKHTMLPart::sendContextMenuEvent): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_proxy.cpp
WebCore/khtml/khtml_part.cpp
WebCore/khtml/khtml_part.h
WebCore/khtml/khtmlpart_p.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQSlot.mm