summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/handlers/html/html.c4
1 files changed, 4 insertions, 0 deletions
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: