On Sunday 11 May 2008, Darin Adler wrote:
> On May 11, 2008, at 5:08 PM, Adam Treat wrote:
> > It would seem that a client application should call iconDatabase()-
> >
> > >iconForPageURL() when it needs to display a particular icon on
> >
> > startup. However, the way IconDatabase is written it appears that
> > the client application would need to call this method *twice* before
> > being able to retrieve the actual icon from disk.
>
> The client should call retainIconForPageURL as soon as it discovers it
> will need the icon for a particular URL.
>
> Later, dispatchDidAddIconForPageURL will be called on the client when
> that icon is available.

How is it actually read from disk then?  Looking at the code... the only time 
it is actually read from disk is in IconDatabase::readFromDatabase and even 
then it only reads in icons that are flagged in m_iconsPendingReading.  And 
when grepping the code the only time I see that an icon is inserted into 
m_iconsPendingReading is when iconForPageUrl is called??

> At that point, the client can call iconForPageURL to get the icon.
>
> If the icon is no longer needed, the client should call
> releaseIconForPageURL.
>
>      -- Darin


_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to