Commit 1c0320b6 authored by oliver's avatar oliver

2007-03-28 Oliver Hunt <oliver@apple.com>

        rs=Hyatt.

        Rollout local changes :-/

        * loader/Cache.cpp:
        (WebCore::Cache::pruneAllResources):
        (WebCore::Cache::remove):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 97c1d600
2007-03-28 Oliver Hunt <oliver@apple.com>
rs=Hyatt.
Rollout local changes :-/
* loader/Cache.cpp:
(WebCore::Cache::pruneAllResources):
(WebCore::Cache::remove):
2007-03-28 Oliver Hunt <oliver@apple.com>
Reviewed by Hyatt.
......
......@@ -42,7 +42,7 @@ using namespace std;
namespace WebCore {
const int cDefaultCacheSize = 1000;// 8192 * 1024;
const int cDefaultCacheSize = 8192 * 1024;
Cache* cache()
{
......@@ -154,7 +154,6 @@ void Cache::pruneLiveResources()
void Cache::pruneAllResources()
{
m_maximumSize = 1000;
// No need to prune if all of our objects fit.
if (m_currentSize <= m_maximumSize)
return;
......@@ -234,12 +233,12 @@ void Cache::remove(CachedResource* resource)
if (resource->referenced())
removeFromLiveResourcesList(resource);
// 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);
// 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();
if (delta)
......
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