diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-09-15 22:47:50 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-09-15 22:47:50 +0000 |
commit | 339bed72725fe901724440939558c5f9817107ed (patch) | |
tree | d2c3fda42a53d4d763f5901fd16e597ce065dd2e /content | |
parent | 3d71da088b83c2cc5741dfdc8f619fbf2bba55a2 (diff) | |
download | netsurf-339bed72725fe901724440939558c5f9817107ed.tar.gz netsurf-339bed72725fe901724440939558c5f9817107ed.tar.bz2 |
Virtualise content handler finalisation calls. Remove pointless implementations.
svn path=/trunk/netsurf/; revision=12797
Diffstat (limited to 'content')
-rw-r--r-- | content/content_factory.c | 3 | ||||
-rw-r--r-- | content/content_factory.h | 13 | ||||
-rw-r--r-- | content/content_protected.h | 2 |
3 files changed, 7 insertions, 11 deletions
diff --git a/content/content_factory.c b/content/content_factory.c index 3f06dc432..8da73337c 100644 --- a/content/content_factory.c +++ b/content/content_factory.c @@ -56,6 +56,9 @@ void content_factory_fini(void) content_handlers = content_handlers->next; + if (victim->handler->fini != NULL) + victim->handler->fini(); + lwc_string_unref(victim->mime_type); free(victim); diff --git a/content/content_factory.h b/content/content_factory.h index 26c587575..22205dc02 100644 --- a/content/content_factory.h +++ b/content/content_factory.h @@ -31,26 +31,17 @@ nserror HNAME##_init(void) \ { \ uint32_t i; \ - nserror error; \ + nserror error = NSERROR_OK; \ \ for (i = 0; i < NOF_ELEMENTS(HTYPELIST); i++) { \ error = content_factory_register_handler( \ HTYPELIST[i], \ &HHANDLER); \ if (error != NSERROR_OK) \ - goto error; \ + break; \ } \ \ - return NSERROR_OK; \ - \ -error: \ - HNAME##_fini(); \ - \ return error; \ -} \ -/* Pointless */ \ -void HNAME##_fini(void) \ -{ \ } struct content; diff --git a/content/content_protected.h b/content/content_protected.h index d9a021f3e..633f33241 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -40,6 +40,8 @@ struct rect; struct redraw_context; struct content_handler { + void (*fini)(void); + nserror (*create)(const content_handler *handler, lwc_string *imime_type, const http_parameter *params, llcache_handle *llcache, |