Skip to content

Remove unnecessary helper function #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -50249,12 +50249,6 @@ static void fulfill_or_reject_promise(JSContext *ctx, JSValueConst promise,
}
}

static void reject_promise(JSContext *ctx, JSValueConst promise,
JSValueConst value)
{
fulfill_or_reject_promise(ctx, promise, value, true);
}

static JSValue js_promise_resolve_thenable_job(JSContext *ctx,
int argc, JSValueConst *argv)
{
Expand Down Expand Up @@ -50390,7 +50384,7 @@ static JSValue js_promise_resolve_function_call(JSContext *ctx,
JSValue error;
fail_reject:
error = JS_GetException(ctx);
reject_promise(ctx, s->promise, error);
fulfill_or_reject_promise(ctx, s->promise, error, true);
JS_FreeValue(ctx, error);
} else if (!JS_IsFunction(ctx, then)) {
JS_FreeValue(ctx, then);
Expand Down