+2007-03-28 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Hyatt.
+
+ Roll out r20511 due to incredible badness
+
+ * loader/Cache.cpp:
+ (WebCore::Cache::pruneAllResources):
+ (WebCore::Cache::remove):
+
2007-03-27 Oliver Hunt <oliver@apple.com>
Reviewed by Adam.
namespace WebCore {
-const int cDefaultCacheSize = 8192 * 1024;
+const int cDefaultCacheSize = 1000;// 8192 * 1024;
Cache* cache()
{
void Cache::pruneAllResources()
{
+ m_maximumSize = 1000;
// No need to prune if all of our objects fit.
if (m_currentSize <= m_maximumSize)
return;
if (resource->referenced())
removeFromLiveResourcesList(resource);
- // FIXME: Multiple DocLoaders may still be holding the resource at this point
- // effectively resulting in an invisible CachedResource
+ // Notify all doc loaders that might be observing this object still that it has been
+ // extracted from the set of resources.
+ HashSet<DocLoader*>::iterator end = m_docLoaders.end();
+ for (HashSet<DocLoader*>::iterator itr = m_docLoaders.begin(); itr != end; ++itr)
+ (*itr)->removeCachedResource(resource);
// Subtract from our size totals.
int delta = -resource->size();