Skip to content

Commit 17b885f

Browse files
committed
review!
1 parent 0ffb7b1 commit 17b885f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

quickjs.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33745,12 +33745,7 @@ static JSValue js_global_isFinite(JSContext *ctx, JSValueConst this_val,
3374533745
static JSValue js_microtask_job(JSContext *ctx,
3374633746
int argc, JSValueConst *argv)
3374733747
{
33748-
JSValueConst func = argv[0];
33749-
JSValue ret = JS_Call(ctx, func, ctx->global_obj, 0, NULL);
33750-
if (JS_IsException(ret))
33751-
return ret;
33752-
JS_FreeValue(ctx, ret);
33753-
return JS_UNDEFINED;
33748+
return JS_Call(ctx, argv[0], ctx->global_obj, 0, NULL);
3375433749
}
3375533750

3375633751
static JSValue js_global_queueMicrotask(JSContext *ctx, JSValueConst this_val,
@@ -33759,9 +33754,7 @@ static JSValue js_global_queueMicrotask(JSContext *ctx, JSValueConst this_val,
3375933754
if (check_function(ctx, argv[0]))
3376033755
return JS_EXCEPTION;
3376133756

33762-
JSValueConst args[1];
33763-
args[0] = argv[0];
33764-
if (JS_EnqueueJob(ctx, js_microtask_job, 1, args))
33757+
if (JS_EnqueueJob(ctx, js_microtask_job, 1, &argv[0]))
3376533758
return JS_EXCEPTION;
3376633759
return JS_UNDEFINED;
3376733760
}

0 commit comments

Comments
 (0)