[webkit-dev] Frame and FrameView references

Artem Ananiev Artem.Ananiev at Sun.COM
Mon Mar 3 08:51:21 PST 2008


Hi, Darin,

thank you for the provided information. It seems there is some problem 
with my code in Java platform as I clearly see that the Frame instance 
is deleted before its FrameView.

Thanks,

Artem

Darin Adler wrote:
> 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
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


More information about the webkit-dev mailing list