]> git.kaiwu.me - quickjs.git/commitdiff
Poll for interrupts on a taken OP_with_* branch
authorFabrice Bellard <fabrice@bellard.org>
Sat, 21 Nov 2026 13:44:42 +0000 (14:44 +0100)
committerFabrice Bellard <fabrice@bellard.org>
Sat, 21 Nov 2026 13:44:42 +0000 (14:44 +0100)
quickjs.c

index dd83cc9f344a4119b0f08f8a11b17635be714a1c..fabeac6a1156bc30d453dcd34e59d726f9808f2b 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -21213,6 +21213,8 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj,
                         break;
                     }
                     pc += diff - 5;
+                    if (unlikely(js_poll_interrupts(ctx)))
+                        goto exception;
                 } else {
                 no_with:
                     /* if not jumping, drop the object argument */