diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-03-29 06:28:46 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-03-29 06:28:46 +0000 |
commit | 311b458d560d58b9a25e0e579f45b91f4b3a41b2 (patch) | |
tree | 8c38fa5dbad7a611f23f759dffddf34049bf24a6 | |
parent | 4e2c3a4c39a62f2c17753419781d155ea2cf87f5 (diff) | |
download | netsurf-311b458d560d58b9a25e0e579f45b91f4b3a41b2.tar.gz netsurf-311b458d560d58b9a25e0e579f45b91f4b3a41b2.tar.bz2 |
Forbid contents with active fetches from being cleaned.
svn path=/trunk/netsurf/; revision=10199
-rw-r--r-- | content/llcache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/llcache.c b/content/llcache.c index 33f707f48..5527a232d 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -1149,12 +1149,13 @@ nserror llcache_clean(void) * 3) Fresh cacheable objects with no users or pending fetches */ - /* 1) Uncacheable objects with no users */ + /* 1) Uncacheable objects with no users or fetches */ for (object = llcache_uncached_objects; object != NULL; object = next) { next = object->next; /* The candidate count of uncacheable objects is always 0 */ - if (object->users == NULL && object->candidate_count == 0) { + if (object->users == NULL && object->candidate_count == 0 && + object->fetch.fetch == NULL) { #ifdef LLCACHE_TRACE LOG(("Found victim %p", object)); #endif @@ -1169,7 +1170,8 @@ nserror llcache_clean(void) next = object->next; if (object->users == NULL && object->candidate_count == 0 && - llcache_object_is_fresh(object) == false) { + llcache_object_is_fresh(object) == false && + object->fetch.fetch == NULL) { #ifdef LLCACHE_TRACE LOG(("Found victim %p", object)); #endif |