summaryrefslogtreecommitdiff
path: root/content/handlers/html
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 14:29:53 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 14:30:30 +0100
commit6ba199c7d7bee1909107ee0b8cbaf749c575b310 (patch)
tree9932d32f3fd90c341022257d6c22061fe990725c /content/handlers/html
parent2171f13ab334716250ca2bc53946806f7a88c8a3 (diff)
downloadnetsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.gz
netsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.bz2
Content messages: Remove ERRORCODE, rework ERROR
This reworks CONTENT_MSG_ERROR to be structured data and removes the CONTENT_MSG_ERRORCODE message kind. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/handlers/html')
-rw-r--r--content/handlers/html/html_css.c4
-rw-r--r--content/handlers/html/html_object.c8
-rw-r--r--content/handlers/html/html_script.c12
3 files changed, 6 insertions, 18 deletions
diff --git a/content/handlers/html/html_css.c b/content/handlers/html/html_css.c
index 70ed83f3d..9d7cc7132 100644
--- a/content/handlers/html/html_css.c
+++ b/content/handlers/html/html_css.c
@@ -116,10 +116,8 @@ html_convert_css_callback(hlcache_handle *css,
case CONTENT_MSG_ERROR:
NSLOG(netsurf, INFO, "stylesheet %s failed: %s",
nsurl_access(hlcache_handle_get_url(css)),
- event->data.error);
- /* fall through */
+ event->data.errordata.errormsg);
- case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(css);
s->sheet = NULL;
parent->base.active--;
diff --git a/content/handlers/html/html_object.c b/content/handlers/html/html_object.c
index f49af6505..dc8524499 100644
--- a/content/handlers/html/html_object.c
+++ b/content/handlers/html/html_object.c
@@ -137,9 +137,7 @@ html_object_callback(hlcache_handle *object,
struct box *box;
box = o->box;
- if (box == NULL &&
- event->type != CONTENT_MSG_ERROR &&
- event->type != CONTENT_MSG_ERRORCODE) {
+ if (box == NULL && event->type != CONTENT_MSG_ERROR) {
return NSERROR_OK;
}
@@ -195,7 +193,6 @@ html_object_callback(hlcache_handle *object,
}
break;
- case CONTENT_MSG_ERRORCODE:
case CONTENT_MSG_ERROR:
hlcache_handle_release(object);
@@ -472,8 +469,7 @@ html_object_callback(hlcache_handle *object,
c->base.active == 0 &&
(event->type == CONTENT_MSG_LOADING ||
event->type == CONTENT_MSG_DONE ||
- event->type == CONTENT_MSG_ERROR ||
- event->type == CONTENT_MSG_ERRORCODE)) {
+ event->type == CONTENT_MSG_ERROR)) {
/* all objects have arrived */
content__reformat(&c->base, false, c->base.available_width,
c->base.available_height);
diff --git a/content/handlers/html/html_script.c b/content/handlers/html/html_script.c
index 5af4750ff..14e291ae1 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -183,10 +183,8 @@ convert_script_async_cb(hlcache_handle *script,
case CONTENT_MSG_ERROR:
NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)),
- event->data.error);
- /* fall through */
+ event->data.errordata.errormsg);
- case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script);
s->data.handle = NULL;
parent->base.active--;
@@ -259,10 +257,8 @@ convert_script_defer_cb(hlcache_handle *script,
case CONTENT_MSG_ERROR:
NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)),
- event->data.error);
- /* fall through */
+ event->data.errordata.errormsg);
- case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script);
s->data.handle = NULL;
parent->base.active--;
@@ -350,10 +346,8 @@ convert_script_sync_cb(hlcache_handle *script,
case CONTENT_MSG_ERROR:
NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)),
- event->data.error);
- /* fall through */
+ event->data.errordata.errormsg);
- case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script);
s->data.handle = NULL;
parent->base.active--;