Changing typedef int JSInterruptHandler(JSRuntime *rt, void *opaque); to typedef int JSInterruptHandler(JSContext *ctx, void *opaque); would allow the handler to selectively decide whether to interrupt execution depending on the specific context being executed.
Changing
typedef int JSInterruptHandler(JSRuntime *rt, void *opaque);totypedef int JSInterruptHandler(JSContext *ctx, void *opaque);would allow the handler to selectively decide whether to interrupt execution depending on the specific context being executed.