summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2020-02-23 14:28:27 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2020-02-23 14:28:27 +0000
commitf3b7a0c44cbf006679faabf9e4d971b2e62cc37a (patch)
treecd20aab039d6ae1890f83ae7e442c6b5c1d24f7b
parentbc94555d9e5f51bc044a1a3413a932d69190f503 (diff)
downloadnetsurf-f3b7a0c44cbf006679faabf9e4d971b2e62cc37a.tar.gz
netsurf-f3b7a0c44cbf006679faabf9e4d971b2e62cc37a.tar.bz2
HTML Script: Check for success on intern of mimetype.
-rw-r--r--content/handlers/html/html_script.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/handlers/html/html_script.c b/content/handlers/html/html_script.c
index 9dad53117..4df5f3384 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -540,7 +540,11 @@ exec_inline_script(html_content *c, dom_node *node, dom_string *mimetype)
nscript->already_started = true;
/* ensure script handler for content type */
- dom_string_intern(mimetype, &lwcmimetype);
+ exc = dom_string_intern(mimetype, &lwcmimetype);
+ if (exc != DOM_NO_ERR) {
+ return DOM_HUBBUB_DOM;
+ }
+
script_handler = select_script_handler(content_factory_type_from_mime_type(lwcmimetype));
lwc_string_unref(lwcmimetype);