summaryrefslogtreecommitdiff
path: root/content/handlers/html
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/html')
-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;
}