diff options
author | bptato <nincsnevem662@gmail.com> | 2025-05-11 18:40:15 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-05-11 18:40:15 +0200 |
commit | de7ff7388f6882ec2b1def33b25656cb81d7c3cf (patch) | |
tree | 5ee290bd919dc2d47dd492b35caf84bc646f10fb /lib/monoucha0 | |
parent | e7a175c2878f0ae7edf1eca084edd9ff218a3aaf (diff) | |
download | chawan-de7ff7388f6882ec2b1def33b25656cb81d7c3cf.tar.gz |
quickjs: fix lre_exec without JSContext opaque
Diffstat (limited to 'lib/monoucha0')
-rw-r--r-- | lib/monoucha0/monoucha/qjs/quickjs.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/monoucha0/monoucha/qjs/quickjs.c b/lib/monoucha0/monoucha/qjs/quickjs.c index 80c492bb..4be0cdb4 100644 --- a/lib/monoucha0/monoucha/qjs/quickjs.c +++ b/lib/monoucha0/monoucha/qjs/quickjs.c @@ -45565,16 +45565,21 @@ fail: bool lre_check_stack_overflow(void *opaque, size_t alloca_size) { - if (!opaque) - return 0; JSContext *ctx = opaque; + + if (!ctx) + return 0; return js_check_stack_overflow(ctx->rt, alloca_size); } int lre_check_timeout(void *opaque) { JSContext *ctx = opaque; - JSRuntime *rt = ctx->rt; + JSRuntime *rt; + + if (!ctx) + return 0; + rt = ctx->rt; return (rt->interrupt_handler && rt->interrupt_handler(rt, rt->interrupt_opaque)); } |