flag used for actor stopping insetad of counter
This commit is contained in:
@@ -1879,9 +1879,8 @@ void JS_SetPoolSize (JSRuntime *rt, size_t initial, size_t cap) {
|
||||
#define free(p) free_is_forbidden (p)
|
||||
#define realloc(p, s) realloc_is_forbidden (p, s)
|
||||
|
||||
void JS_SetInterruptHandler (JSContext *ctx, JSInterruptHandler *cb, void *opaque) {
|
||||
ctx->interrupt_handler = cb;
|
||||
ctx->interrupt_opaque = opaque;
|
||||
void JS_SetPauseFlag (JSContext *ctx, int value) {
|
||||
atomic_store_explicit (&ctx->pause_flag, value, memory_order_relaxed);
|
||||
}
|
||||
|
||||
int JS_GetVMCallDepth(JSContext *ctx) {
|
||||
@@ -5358,8 +5357,7 @@ JSValue js_regexp_toString (JSContext *ctx, JSValue this_val, int argc, JSValue
|
||||
|
||||
int lre_check_timeout (void *opaque) {
|
||||
JSContext *ctx = opaque;
|
||||
return (ctx->interrupt_handler
|
||||
&& ctx->interrupt_handler (ctx->rt, ctx->interrupt_opaque));
|
||||
return atomic_load_explicit (&ctx->pause_flag, memory_order_relaxed) >= 2;
|
||||
}
|
||||
|
||||
void *lre_realloc (void *opaque, void *ptr, size_t size) {
|
||||
|
||||
Reference in New Issue
Block a user