.then improperly propagates progress from locked-in Deferred #3062

Closed
gibson042 opened this Issue Apr 15, 2016 · 2 comments

Projects

None yet

2 participants

@gibson042
Member

When .then locks in a Deferred by rebinding to a thenable resolved by its base, progress context is inappropriately propagated as progress data, and progress data is in appropriately wrapped in an array. It's probably easier to explain in code than in natural language: https://jsfiddle.net/zwavzvpx/ .

This happens because .notify is used where .notifyWith belongs, at deferred.js#L131.

@gibson042 gibson042 self-assigned this Apr 15, 2016
@gibson042 gibson042 added the Deferred label Apr 15, 2016
@gibson042 gibson042 added this to the 3.0.1 milestone Apr 15, 2016
@mgol mgol added the Needs review label May 26, 2016
@mgol
Member
mgol commented May 26, 2016

We got an external report as well and as far as I understand it's a regression so I added the "Needs review" label as we might want that for 3.0.0.

@mgol mgol self-assigned this Jun 8, 2016
@mgol mgol modified the milestone: 3.0.0, 3.0.1 Jun 8, 2016
@mgol mgol added a commit to mgol/jquery that referenced this issue Jun 8, 2016
@mgol mgol Deferred: Propagate progress correctly from unwrapped promises
Progress parameters are now correctly propagated from a deferred to which
another deferred resolved unwrapping it.

Thanks to @gibson042 for the report and a clear description of the problem
and the needed fix.

Fixes gh-3062
6b3440a
@mgol
Member
mgol commented Jun 8, 2016

PR: #3150. Please review, I want to get it in 3.0.0. And thanks @gibson042 for a clear description of the situation and the needed fix!

@mgol mgol added Has Pull Request and removed Needs review labels Jun 8, 2016
@mgol mgol added a commit to mgol/jquery that referenced this issue Jun 9, 2016
@mgol mgol Deferred: Propagate progress correctly from unwrapped promises
Progress parameters are now correctly propagated from a deferred to which
another deferred resolved unwrapping it.

Thanks to @gibson042 for the report and a clear description of the problem
and the needed fix.

Fixes gh-3062
Closes gh-3150
d5dae25
@mgol mgol closed this in #3150 Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment