kill actor when abusive
This commit is contained in:
@@ -1138,6 +1138,13 @@ struct JSContext {
|
||||
JSValue reg_current_frame; /* current JSFrameRegister being executed */
|
||||
uint32_t current_register_pc; /* PC at exception time */
|
||||
|
||||
/* VM suspend/resume state */
|
||||
int suspended; /* 1 = VM was suspended (not exception) */
|
||||
JSGCRef suspended_frame_ref; /* GC-rooted saved frame for resume */
|
||||
uint32_t suspended_pc; /* saved PC for resume */
|
||||
int vm_call_depth; /* 0 = pure bytecode, >0 = C frames on stack */
|
||||
size_t heap_memory_limit; /* 0 = no limit, else max heap bytes */
|
||||
|
||||
JSInterruptHandler *interrupt_handler;
|
||||
void *interrupt_opaque;
|
||||
|
||||
@@ -1540,7 +1547,8 @@ void JS_ThrowInterrupted (JSContext *ctx);
|
||||
static no_inline __exception int __js_poll_interrupts (JSContext *ctx) {
|
||||
ctx->interrupt_counter = JS_INTERRUPT_COUNTER_INIT;
|
||||
if (ctx->interrupt_handler) {
|
||||
if (ctx->interrupt_handler (ctx->rt, ctx->interrupt_opaque)) {
|
||||
int r = ctx->interrupt_handler (ctx->rt, ctx->interrupt_opaque);
|
||||
if (r < 0) {
|
||||
JS_ThrowInterrupted (ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user