Skip to content

fix(zone.js): do not silence uncaught promise rejections when the finally is called - #46462

Closed
arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/43206
Closed

arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/43206

Conversation

@arturovt

Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

  • Bugfix

…nally` is called

The native promise implementation logs unhandled promise rejections after `onFinally`
has been called. We may rely on the `scheduledByFinally` argument, which is `false` by
default, to avoid creating a breaking change; this will also allow us to reduce the number of
changes. The `finally` function should not silence unhandled promise rejections, because
they're not silenced in any implementation. If the `scheduleResolveOrReject` is called within
the `finally` we won't clear unhandled rejections. We'll keep the same behaviour if the
`scheduleResolveOrReject` is called within the `then`.

PR Close angular#43206
@pullapprove
pullapprove Bot requested a review from JiaLiPassion June 22, 2022 23:12
@arturovt

Copy link
Copy Markdown
Contributor Author

@AndrewKushnir re-created as asked here: #45449 (comment).

@AndrewKushnir AndrewKushnir added target: minor This PR is targeted for the next minor release action: global presubmit The PR is in need of a google3 global presubmit area: zones Issues related to zone.js labels Jun 22, 2022
@ngbot ngbot Bot added this to the Backlog milestone Jun 22, 2022
@AndrewKushnir AndrewKushnir self-assigned this Jun 22, 2022
@AndrewKushnir

Copy link
Copy Markdown
Contributor

@arturovt thanks for re-creating the PR 👍 I will need to do some cleanup work in Google's codebase and let you know if I find any patterns that might need extra attention. Thank you.

@AndrewKushnir

Copy link
Copy Markdown
Contributor

Global Presubmit.

@AndrewKushnir

Copy link
Copy Markdown
Contributor

@arturovt unfortunately, this change caused a number of failures in Google's codebase. We'd need to discuss the next steps with the team, but the current state looks similar to #45447, see #45447 (comment).

@arturovt

Copy link
Copy Markdown
Contributor Author

Closing since this breaks some tests internally, which would require some effort to investigate and land in g3.

@arturovt arturovt closed this May 20, 2024
@arturovt
arturovt deleted the fix/43206 branch May 20, 2024 09:45
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: global presubmit The PR is in need of a google3 global presubmit area: zones Issues related to zone.js state: blocked target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants