Repository navigation
Conversation
Animation notifies progress with the animation object, which is the same promise `.then()` was called on. Identity treated that value as a thenable and called `.then()` again, re-attaching progress handlers. Because progress has memory, this looped until the tab crashed. Skip thenable adoption when the returned `then` is this promise's own `then`. Fixes jquery#5534 Fixes jquerygh-5534
|
Author
|
recheck |
Member
|
The CLA check is still not passing, please sign the CLA; only then we can consider your contribution. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Calling
.then()on an animation fromstart(or on any deferred thatnotifys with itself) looped inside Deferred/Callbacks until the tab ran out of memory..then()forwards progress through Identity. Animation's first progress value is the animation promise, so Identity returned that same thenable andthen()attached another progress handler. Progress has memory, so the handler ran again immediately.Skip thenable unwrapping when the returned
thenis this promise's ownthen. Foreign thenables still unwrap, including the existing "implicit progress callbacks unwrap thenables" tests.Fixes #5534
Checklist