From 86a2e0076d0789247a28f370d16583ee4fc87f05 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 27 Feb 2011 20:11:39 +0000 Subject: Fix bug #3194007: stop emitting duplicate READY/DONE events. * Make content handlers responsible for setting READY/DONE state & emitting events. * Stop content_convert doing this when there is a registered convert function for the content type. svn path=/trunk/netsurf/; revision=11850 --- content/content.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index 60996f6a0..35b6a2096 100644 --- a/content/content.c +++ b/content/content.c @@ -686,19 +686,13 @@ void content_convert(struct content *c) LOG(("content %s (%p)", llcache_handle_get_url(c->llcache), c)); - c->locked = true; if (handler_map[c->type].convert) { + c->locked = true; if (!handler_map[c->type].convert(c)) { c->status = CONTENT_STATUS_ERROR; } + c->locked = false; } else { - c->status = CONTENT_STATUS_DONE; - } - c->locked = false; - - if (c->status == CONTENT_STATUS_READY) - content_set_ready(c); - if (c->status == CONTENT_STATUS_DONE) { content_set_ready(c); content_set_done(c); } -- cgit v1.2.3