Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: add missing return after reject in Promise.all for already-rejected promises#182

Open
deepview-autofix wants to merge 1 commit into
then:master from
deepview-autofix:deepview/66840546a7
Open

fix: add missing return after reject in Promise.all for already-rejected promises #182
deepview-autofix wants to merge 1 commit into
then:master from
deepview-autofix:deepview/66840546a7

Conversation

@deepview-autofix

@deepview-autofix deepview-autofix commented Apr 15, 2026

Copy link
Copy Markdown

When an already-rejected promise (state === 2) was passed to Promise.all, reject(val._value) was called but execution fell through to val.then(...), attaching an unnecessary handler to the already-rejected promise. This is inconsistent with the return pattern used for fulfilled promises (state === 1) on the preceding line. While the doResolve 'done' guard prevented incorrect behavior, the missing return wasted resources by scheduling an extra asynchronous handler invocation.

...ected promises
When an already-rejected promise (state === 2) was passed to Promise.all,
reject(val._value) was called but execution fell through to val.then(...),
attaching an unnecessary handler to the already-rejected promise. This is
inconsistent with the return pattern used for fulfilled promises (state === 1)
on the preceding line. While the doResolve 'done' guard prevented incorrect
behavior, the missing return wasted resources by scheduling an extra
asynchronous handler invocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: DeepView Autofix <276251120+deepview-autofix@users.noreply.github.com>
Co-Authored-By: Nikita Skovoroda <chalkerx@gmail.com>
Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>

Copy link
Copy Markdown

There is no change log for this pull request yet.

Create a changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /