2008-05-07 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 20:41:34 +0000 (20:41 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 20:41:34 +0000 (20:41 +0000)
commit5258729f552824788ee667bc6c0236d2cdb145a0
treeaac9fb376db62366bfb229241c2ca874391973ea
parent16cd7adb1c7e48cdf49a8a2fecb1ccba34c1d448
2008-05-07  Anders Carlsson  <andersca@apple.com>

        Reviewed by John.

        When no document loaders are associated with an application cache group,
        release the reference to the newest cache group. This prevents reference cycles.

        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
        (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
        (WebCore::ApplicationCacheGroup::cacheDestroyed):
        * loader/appcache/ApplicationCacheGroup.h:

        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::cacheGroupForURL):
        Return early if the datbase wasn't open.

        (WebCore::ApplicationCacheStorage::loadCache):
        Add error.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/appcache/ApplicationCacheGroup.cpp
WebCore/loader/appcache/ApplicationCacheGroup.h
WebCore/loader/appcache/ApplicationCacheStorage.cpp