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

Adam Treat treat at kde.org
Sun May 11 17:08:02 PDT 2008


Hi,

I do not understand how a client application should use IconDatabase to 
display icons given its async nature.

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 only time image data is actually read from disk is in 
IconDatabase::readFromDatabase() and the only icons it reads are marked by 
the set of icons in m_iconsPendingReading.  However, the only time 
IconRecord's are actually *added* to m_iconsPendingReading is in 
IconDatabase::iconForPageURL()...??

So, it appears a client application has to call IconDatabase::iconForPageURL 
twice before being able to actually retrieve the icon image data.  Once for 
scheduling it to be read from disk and a second time to actually retrieve 
it??!!

What am I missing?

Adam


More information about the webkit-dev mailing list