summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-04-22 12:29:15 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-04-22 12:29:15 +0000
commit7eef1a387a6f70d892e720932bf8da7a97dfbba4 (patch)
tree0c108aa18d94d1240d437caadc1c6d459d0d99a1 /content/hlcache.c
parent3d31372b9dd9c34fe99785711651394bd55189eb (diff)
downloadnetsurf-7eef1a387a6f70d892e720932bf8da7a97dfbba4.tar.gz
netsurf-7eef1a387a6f70d892e720932bf8da7a97dfbba4.tar.bz2
Ensure we propagate the error to our client, and then abort the llcache handle, should we fail to find a content when converting a nascent hlcache context into an object
svn path=/trunk/netsurf/; revision=10453
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index aedd57e80..49cceb0a2 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -356,7 +356,17 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
ctx->accepted_types, &type)) {
error = hlcache_find_content(ctx);
if (error != NSERROR_OK) {
- free((char *) ctx->child.charset);
+ hlcache_event hlevent;
+
+ hlevent.type = CONTENT_MSG_ERROR;
+ hlevent.data.error = messages_get("MiscError");
+
+ ctx->handle->cb(ctx->handle, &hlevent,
+ ctx->handle->pw);
+
+ llcache_handle_abort(handle);
+ llcache_handle_release(handle);
+ free((char *) ctx->child.charset);
free(ctx);
return error;
}