Opened 14 years ago

Closed 14 years ago

#4240 closed defect (fixed)

DeferredList errors

Reported by: Bryan Forbes Owned by: Dustin Machi
Priority: high Milestone: 1.0
Component: Core Version: 0.9
Keywords: Cc: Dustin Machi
Blocked By: Blocking:

Description (last modified by Bryan Forbes)

I have found three big bugs:

  1. DeferredList? throws an error about _cbDeferred not being a function. This is because there is no scope given on the addCallback and addErrback in lines 30 and 31.
  1. The original callbacks don't get anything to their arguments because the addCallback and addErrback functions in lines 30 and 31 don't return anything.
  1. The DeferredList?'s callback is fired before the last deferred's callback is called.

Attachments (1)

DeferredList.diff (2.9 KB) - added by Bryan Forbes 14 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by Bryan Forbes

Description: modified (diff)
Summary: DeferredList throws an error about this not having a _cbDeferred functionDeferredList errors

Changed 14 years ago by Bryan Forbes

Attachment: DeferredList.diff added

comment:2 Changed 14 years ago by Bryan Forbes

Cc: Dustin Machi added
Owner: changed from Bryan Forbes to sjmiles

I have attached a patch that fixes 1 and 2. I also simplified the forEach loop in the process. This, however, does not fix 3. I added a unit test file with two tests. The first (if run before the patch to DeferredList?.js) shows 1 and 2. The second shows 3.

comment:3 Changed 14 years ago by sjmiles

Owner: changed from sjmiles to alex

Not sure why this got assigned to me, I think it belongs to either dmachi or alex.

comment:4 Changed 14 years ago by bill

Milestone: 0.91.0

comment:5 Changed 14 years ago by Adam Peller

Owner: changed from alex to Dustin Machi

comment:6 Changed 14 years ago by Dustin Machi

1 has already been fixed in a checkin earlier today. 3 is the spec'd behavior (the callbacks are attached to the callback chain of the individual deferreds at the time the list is created. I'll incorporate your changes for 2.

comment:7 Changed 14 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [10784]) fixes deferred list return problem. fixes #4240 execept issue 3 which is the expected behavior though admittedly can be confusing at times.

Note: See TracTickets for help on using tickets.