After I launch a client app for webkit that uses favicons from the database, e.g. through WebHistoryItem icon accessors, these icons are not available (i.e. the default 'globe' icon is always returned) after a relaunch of the client. Favicons that are loaded during the launch session are properly used, but not saved icons from the database. I have confirmed that the WebIconDatabaseEnabled pref is true, and that the WebIconDatabaseDirectoryDefaultsKey pref is set to the default "~/Library/Icons" (which BTW is the wrong thing to do), and that database file does get updated. I have also checked that -[WebIconDatabase _startUpIconDatabase] is indeed called, which measn that also iconDatabase()->setEnabled(true) iconDatabase()->open(databaseDirectory) are called. So the problem must be in WebCore somewhere.
As you can probably see from Safari, the icon database does work. It would be significantly easier to investigate this if you were to provide a simple, standalone test application (with source) that demonstrated the problem. That will allow us to determine if there is a bug in your use of the API or in WebKit itself.
Created attachment 72313 [details] Simple WebKit based browser app using favicon in History menu