From cbc28d2c9879afea534c5f48cc1fe1d251d2b114 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 29 Mar 2020 14:31:33 +0100 Subject: html: Also close js thread on html_stop() Signed-off-by: Daniel Silverstone --- content/handlers/html/html.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c index 871a5e8c7..f2b898de7 100644 --- a/content/handlers/html/html.c +++ b/content/handlers/html/html.c @@ -1642,6 +1642,10 @@ static void html_stop(struct content *c) /* Still loading; simply flag that we've been aborted * html_convert/html_finish_conversion will do the rest */ htmlc->aborted = true; + if (htmlc->jsthread != NULL) { + /* Close the JS thread to cancel out any callbacks */ + js_closethread(htmlc->jsthread); + } break; case CONTENT_STATUS_READY: -- cgit v1.2.3