Commit 41eba0bf authored by ggaren's avatar ggaren
Browse files

Reviewed by Darin.

        
        Temporary work-around for frame lifetime issue.

        * page/Frame.cpp:
        (WebCore::Frame::clear):
        (WebCore::Frame::disconnectOwnerElement):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 460f0156
2006-09-26 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
Temporary work-around for frame lifetime issue.
* page/Frame.cpp:
(WebCore::Frame::clear):
(WebCore::Frame::disconnectOwnerElement):
2006-09-26 Sam Weinig <sam.weinig@gmail.com>
 
Reviewed by Tim H.
......@@ -467,6 +467,14 @@ void Frame::clear(bool clearWindowProperties)
d->m_bCleared = true;
d->m_mousePressNode = 0;
#if !PLATFORM(MAC)
// FIXME: This is a temporary hack to work around a mismatch between WebCore and WebKit
// regarding frame lifetime. The proper solution is to move all frame management
// into WebCore, so frames can work the same way on all platforms.
for (Frame* descendant = tree()->firstChild(); descendant; descendant = descendant->tree()->traverseNext())
descendant->disconnectOwnerElement();
#endif
if (d->m_doc) {
d->m_doc->cancelParsing();
d->m_doc->detach();
......@@ -3639,7 +3647,7 @@ void Frame::started()
void Frame::disconnectOwnerElement()
{
if (d->m_ownerElement)
if (d->m_ownerElement && d->m_page)
d->m_page->decrementFrameCount();
d->m_ownerElement = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment