summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-22 10:18:30 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-22 10:18:30 +0000
commit6a2ce2b3c74c3f5b0d0faee9fb0d6517bbc64fd7 (patch)
tree5fefb3baf995183c7a37230765992e1aaed6c908 /content
parent8f7bfb7b564069ed5d2bb81a709f49724a795959 (diff)
downloadnetsurf-6a2ce2b3c74c3f5b0d0faee9fb0d6517bbc64fd7.tar.gz
netsurf-6a2ce2b3c74c3f5b0d0faee9fb0d6517bbc64fd7.tar.bz2
HTML: Use new js_closethread()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content')
-rw-r--r--content/handlers/html/html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 5b6a15f7d..871a5e8c7 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -1969,6 +1969,7 @@ html_open(struct content *c,
static nserror html_close(struct content *c)
{
html_content *htmlc = (html_content *) c;
+ nserror ret = NSERROR_OK;
selection_clear(&htmlc->sel, false);
@@ -1982,7 +1983,12 @@ static nserror html_close(struct content *c)
/* remove all object references from the html content */
html_object_close_objects(htmlc);
- return NSERROR_OK;
+ if (htmlc->jsthread != NULL) {
+ /* Close, but do not destroy (yet) the JS thread */
+ ret = js_closethread(htmlc->jsthread);
+ }
+
+ return ret;
}