From 6a2ce2b3c74c3f5b0d0faee9fb0d6517bbc64fd7 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 22 Mar 2020 10:18:30 +0000 Subject: HTML: Use new js_closethread() Signed-off-by: Daniel Silverstone --- content/handlers/html/html.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'content/handlers') 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; } -- cgit v1.2.3