html: Also close js thread on html_stop()

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-03-29 14:31:33 +01:00
parent 6b0cb5479f
commit cbc28d2c98
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -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: