[webkit-dev] Async IconDatabase and reading icons from disk on
treat at kde.org
Sun May 11 18:44:12 PDT 2008
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
> -- Darin
More information about the webkit-dev