diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-03-29 14:31:33 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-03-29 14:31:42 +0100 |
commit | cbc28d2c9879afea534c5f48cc1fe1d251d2b114 (patch) | |
tree | 5cc388cfdad0e0877a82bbb18dc3b7061921fb22 | |
parent | 6b0cb5479faf311d274b1fba23e445f18c0d57a8 (diff) | |
download | netsurf-cbc28d2c9879afea534c5f48cc1fe1d251d2b114.tar.gz netsurf-cbc28d2c9879afea534c5f48cc1fe1d251d2b114.tar.bz2 |
html: Also close js thread on html_stop()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | content/handlers/html/html.c | 4 |
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: |