Skip to content

Commit 09d76ed

Browse files
committed
Remove unnecessary helper function
The only place where it was called was already calling fulfill_or_reject_promise in another code path, so inline it.
1 parent bda05fb commit 09d76ed

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

quickjs.c

+1-7
Original file line numberDiff line numberDiff line change
@@ -50274,12 +50274,6 @@ static void fulfill_or_reject_promise(JSContext *ctx, JSValueConst promise,
5027450274
}
5027550275
}
5027650276

50277-
static void reject_promise(JSContext *ctx, JSValueConst promise,
50278-
JSValueConst value)
50279-
{
50280-
fulfill_or_reject_promise(ctx, promise, value, true);
50281-
}
50282-
5028350277
static JSValue js_promise_resolve_thenable_job(JSContext *ctx,
5028450278
int argc, JSValueConst *argv)
5028550279
{
@@ -50425,7 +50419,7 @@ static JSValue js_promise_resolve_function_call(JSContext *ctx,
5042550419
JSValue error;
5042650420
fail_reject:
5042750421
error = JS_GetException(ctx);
50428-
reject_promise(ctx, s->promise, error);
50422+
fulfill_or_reject_promise(ctx, s->promise, error, true);
5042950423
JS_FreeValue(ctx, error);
5043050424
} else if (!JS_IsFunction(ctx, then)) {
5043150425
JS_FreeValue(ctx, then);

0 commit comments

Comments
 (0)