-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
zone.js Promise.finally behavior different from native #43206
Labels
area: zones
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone
Comments
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Mar 26, 2022
…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
5 tasks
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Jun 18, 2022
…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
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Jun 19, 2022
…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
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Jun 19, 2022
…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
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Jun 19, 2022
…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
Re-opening this issue, since the fix was reverted. |
AndrewKushnir
added
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
P4
A relatively minor issue that is not relevant to core functions
labels
Jun 22, 2022
AndrewKushnir
removed
the
P4
A relatively minor issue that is not relevant to core functions
label
Jun 22, 2022
arturovt
added a commit
to arturovt/angular
that referenced
this issue
Jun 22, 2022
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: zones
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
Sample code
Minimal reproduction
zone.js: https://stackblitz.com/edit/zones-js-zdlcnc?file=index.ts
native: https://stackblitz.com/edit/js-iauprh
What happened in zone.js
zone.js
.finally()
scheduleResolveOrReject then clearRejectedNoCatch, which will remove the uncaught errorPlease provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/zones-js-zdlcnc?file=index.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
The text was updated successfully, but these errors were encountered: