From bba7fbbd9b8c8244ff5a410190d5f8dfac472e41 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 8 Apr 2010 07:09:09 +0000 Subject: Abort and release llcache handle on failure to process data. Make hlcache retrieval ignore erroneous contents. svn path=/trunk/netsurf/; revision=10296 --- content/hlcache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content/hlcache.c') diff --git a/content/hlcache.c b/content/hlcache.c index bbe0cd753..f54ee1937 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -364,6 +364,7 @@ nserror hlcache_find_content(hlcache_retrieval_ctx *ctx) /* Search list of cached contents for a suitable one */ for (entry = hlcache_content_list; entry != NULL; entry = entry->next) { + hlcache_handle entry_handle = { entry, NULL, NULL }; const llcache_handle *entry_llcache; /** \todo Need to ensure that quirks mode matches */ @@ -372,6 +373,10 @@ nserror hlcache_find_content(hlcache_retrieval_ctx *ctx) if (entry->content == NULL) continue; + /* Ignore contents in the error state */ + if (content_get_status(&entry_handle) == CONTENT_STATUS_ERROR) + continue; + /* Ensure that content uses same low-level object as * low-level handle */ entry_llcache = content_get_llcache_handle(entry->content); -- cgit v1.2.3