Commit 4405f7a1 authored by ddkilzer@apple.com's avatar ddkilzer@apple.com
Browse files

Fix logic error in DocLoader::clearPreloads()

        Reviewed by Antti.

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for
        the cached resource before trying to remove it from the cache.  A non-zero
        preload count can prevent the resource from being removed from the cache.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 04e9ec0f
2008-05-12 David Kilzer <ddkilzer@apple.com>
Fix logic error in DocLoader::clearPreloads()
Reviewed by Antti.
* loader/DocLoader.cpp:
(WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for
the cached resource before trying to remove it from the cache. A non-zero
preload count can prevent the resource from being removed from the cache.
2008-05-12 Anders Carlsson <andersca@apple.com>
 
Reviewed by Adam.
......@@ -262,9 +262,9 @@ void DocLoader::clearPreloads()
ListHashSet<CachedResource*>::iterator end = m_preloads.end();
for (ListHashSet<CachedResource*>::iterator it = m_preloads.begin(); it != end; ++it) {
CachedResource* res = *it;
res->decreasePreloadCount();
if (res->preloadResult() == CachedResource::PreloadNotReferenced)
cache()->remove(res);
res->decreasePreloadCount();
}
m_preloads.clear();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment