[webkit-dev] Frame and FrameView references
Darin Adler
darin at apple.com
Fri Feb 29 09:46:31 PST 2008
On Feb 29, 2008, at 4:25 AM, Artem Ananiev wrote:
> setView(0);
> ...
> if (d->m_view) {
> d->m_view->hide();
> d->m_view->clearFrame();
> }
Good catch. This is all dead code and should be replaced with an
assertion:
ASSERT(!d->m_view);
> How this situation is supposed to be handled?
A FrameView holds a RefPtr to the Frame, so there's no way the Frame
could be destroyed until after the FrameView is destroyed.
The only reason there's anything complicated about this is some old
half-obsolete code in the back/forward cache. There's a call to
FrameView::clearFrame() in CachedPage::clear() that is made when the
page that's cached is removed from the cache. It's possible that with
some study this could be removed and we could entirely remove the
clearFrame() function.
-- Darin
More information about the webkit-dev
mailing list