mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
dukky: Don't allow js_exec on a thread pending destruction
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
2cb33b0c33
commit
d3d17ded9c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user