[webkit-dev] Async IconDatabase and reading icons from disk on startup

Darin Adler darin at apple.com
Sun May 11 18:30:43 PDT 2008


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.

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



More information about the webkit-dev mailing list