From 1bd4a34a271e4f839298f56d8e45f02dfa9d378b Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Sun, 5 Jan 2014 14:39:08 +0000 Subject: Remove asserts for default cases from all content message handlers; this is laborious and is no longer useful for catching bugs. --- render/html_css.c | 10 +--------- render/html_object.c | 6 +----- render/html_script.c | 30 +++--------------------------- 3 files changed, 5 insertions(+), 41 deletions(-) (limited to 'render') diff --git a/render/html_css.c b/render/html_css.c index 88c67697d..ad24804a9 100644 --- a/render/html_css.c +++ b/render/html_css.c @@ -97,14 +97,6 @@ html_convert_css_callback(hlcache_handle *css, assert(i != parent->stylesheet_count); switch (event->type) { - case CONTENT_MSG_LOADING: - break; - - case CONTENT_MSG_READY: - break; - - case CONTENT_MSG_REDIRECT: - break; case CONTENT_MSG_DONE: LOG(("done stylesheet slot %d '%s'", i, @@ -143,7 +135,7 @@ html_convert_css_callback(hlcache_handle *css, return NSERROR_OK; default: - assert(0); + break; } if (html_can_begin_conversion(parent)) { diff --git a/render/html_object.c b/render/html_object.c index f4975e9ba..7b34c4a7e 100644 --- a/render/html_object.c +++ b/render/html_object.c @@ -203,10 +203,6 @@ html_object_callback(hlcache_handle *object, } break; - case CONTENT_MSG_REFORMAT: - case CONTENT_MSG_REDIRECT: - break; - case CONTENT_MSG_REDRAW: if (c->base.status != CONTENT_STATUS_LOADING) { union content_msg_data data = event->data; @@ -440,7 +436,7 @@ html_object_callback(hlcache_handle *object, break; default: - assert(0); + break; } if (c->base.status == CONTENT_STATUS_READY && c->base.active == 0 && diff --git a/render/html_script.c b/render/html_script.c index 4aa8aff11..4a82bcd70 100644 --- a/render/html_script.c +++ b/render/html_script.c @@ -172,8 +172,6 @@ convert_script_async_cb(hlcache_handle *script, parent->base.active--; LOG(("%d fetches active", parent->base.active)); - - break; case CONTENT_MSG_ERROR: @@ -188,11 +186,8 @@ convert_script_async_cb(hlcache_handle *script, break; - case CONTENT_MSG_STATUS: - break; - default: - assert(0); + break; } return NSERROR_OK; @@ -219,11 +214,6 @@ convert_script_defer_cb(hlcache_handle *script, assert(i != parent->scripts_count); switch (event->type) { - case CONTENT_MSG_LOADING: - break; - - case CONTENT_MSG_READY: - break; case CONTENT_MSG_DONE: LOG(("script %d done '%s'", i, @@ -245,11 +235,8 @@ convert_script_defer_cb(hlcache_handle *script, break; - case CONTENT_MSG_STATUS: - break; - default: - assert(0); + break; } /* if there are no active fetches remaining begin post parse @@ -333,19 +320,8 @@ convert_script_sync_cb(hlcache_handle *script, break; - case CONTENT_MSG_LOADING: - case CONTENT_MSG_READY: - case CONTENT_MSG_STATUS: - case CONTENT_MSG_REDIRECT: - /* messages content handler will legitamately recive - * but does not need to handle - */ - break; - default: - /* all other messages are unexpected and fatal */ - LOG(("Unhandled message type %d", event->type)); - assert(0); + break; } /* if there are no active fetches remaining begin post parse -- cgit v1.2.3