diff options
Diffstat (limited to 'quickjs-libc.c')
-rw-r--r-- | quickjs-libc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/quickjs-libc.c b/quickjs-libc.c index 10a7d00..023d895 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -4230,17 +4230,15 @@ static void js_std_promise_rejection_check(JSContext *ctx) /* main loop which calls the user JS callbacks */ void js_std_loop(JSContext *ctx) { - JSContext *ctx1; int err; for(;;) { /* execute the pending jobs */ for(;;) { - err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); + err = JS_ExecutePendingJob(JS_GetRuntime(ctx), NULL); if (err <= 0) { - if (err < 0) { - js_std_dump_error(ctx1); - } + if (err < 0) + js_std_dump_error(ctx); break; } } @@ -4271,11 +4269,10 @@ JSValue js_std_await(JSContext *ctx, JSValue obj) JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_PENDING) { - JSContext *ctx1; int err; - err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); + err = JS_ExecutePendingJob(JS_GetRuntime(ctx), NULL); if (err < 0) { - js_std_dump_error(ctx1); + js_std_dump_error(ctx); } if (err == 0) { js_std_promise_rejection_check(ctx); |