summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/handlers/javascript/duktape/dukky.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/handlers/javascript/duktape/dukky.c b/content/handlers/javascript/duktape/dukky.c
index 7357863cd..6d877129b 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -925,6 +925,11 @@ js_exec(jsthread *thread, const uint8_t *txt, size_t txtlen, const char *name)
return false;
}
+ if (thread->pending_destroy) {
+ NSLOG(dukky, DEEPDEBUG, "Skipping exec call because thread is dead");
+ return false;
+ }
+
dukky_enter_thread(thread);
duk_set_top(CTX, 0);