Reviewed by Maciej
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Aug 2006 07:08:01 +0000 (07:08 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Aug 2006 07:08:01 +0000 (07:08 +0000)
commit3a963f980d9b5367526e0aa2d79b86c1313a364e
treed00dd5666f4bc135a902052bbe93186291b092a1
parent6e6f6bd30c4b06afcd6dfc346d245ebd1ce294ff
    Reviewed by Maciej

        <rdar://4690949> - New IconDB: Need to prune unretained icons on startup

        Added a flag to track whether or not the initial pruning has taken place on startup
        If that flag is not set, IconURL retain counts will be tracked in a temporary db table
        in addition to the in-memory hash.  Then when the timer fires after initial retains
        are complete, we prune those icons not in the retain table, prune dangling PageURL
        references, delete the temporary table, and set the flag - and carry on as normal

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase): initialize the flag
        (WebCore::IconDatabase::open): changed the schema of the temporary table
        (WebCore::IconDatabase::retainIconURL): store the icon retain to the temp table if starting up
        (WebCore::IconDatabase::releaseIconURL): ditto
        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): remove all icons *not* in the retain table, then
          wipe all the PageURLs who no longer point to a valid IconURL
        * loader/icon/IconDatabase.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h