From b7893f85cd564edca5f41ec0d139ffcc3aedf6f2 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 3 Mar 2011 21:13:58 +0000 Subject: Do not attempt to destroy contents that are still loading svn path=/trunk/netsurf/; revision=11898 --- content/content.h | 1 + content/content_protected.h | 1 - content/hlcache.c | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/content.h b/content/content.h index b2696bc10..66a1207d4 100644 --- a/content/content.h +++ b/content/content.h @@ -107,6 +107,7 @@ void content_remove_user(struct content *c, uint32_t content_count_users(struct content *c); bool content_matches_quirks(struct content *c, bool quirks); bool content_is_shareable(struct content *c); +content_status content__get_status(struct content *c); const struct llcache_handle *content_get_llcache_handle(struct content *c); diff --git a/content/content_protected.h b/content/content_protected.h index 6a78d8ad1..38f381583 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -219,7 +219,6 @@ content_type content__get_type(struct content *c); const char *content__get_mime_type(struct content *c); const char *content__get_url(struct content *c); const char *content__get_title(struct content *c); -content_status content__get_status(struct content *c); const char *content__get_status_message(struct content *c); int content__get_width(struct content *c); int content__get_height(struct content *c); diff --git a/content/hlcache.c b/content/hlcache.c index 6d4c3ea48..b31b0d4d8 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -378,6 +378,10 @@ void hlcache_clean(void) if (entry->content == NULL) continue; + if (content__get_status(entry->content) == + CONTENT_STATUS_LOADING) + continue; + if (content_count_users(entry->content) != 0) continue; -- cgit v1.2.3