domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.23k stars 94 forks source link

What motivates the complicated dance for NewPromiseCapability? #104

Open domenic opened 10 years ago

domenic commented 10 years ago

@allenwb, would appreciate your help on this.

Back in https://github.com/domenic/promises-unwrapping/tree/a3a8a88c9091a009be7d2320cf0e590317db5956, we had a very simple GetDeferred + Deferred Construction Functions pair. Now we have a complicated dance involving NewPromiseCapability, CreatePromiseCapabilityRecord, and GetCapabilitiesExecutor Functions, each of which is much longer than either of their previous counterparts, and all of which contain extensive invariant checks and tricks.

To make matters worse, from what I can tell the checks introduced there are at the root of the problems @cscott is experiencing with bugs like #94 and #95.

What have we gained with the new system, and can you see a way of fixing it to fix those bugs? I would much rather just revert to the old system if that's possible.

domenic commented 10 years ago

Ping @allenwb

domenic commented 9 years ago

Assigning back to me. Action item: figure out what, if any, observable differences there are between the previous version and the current one. That will help resolve #94 and #95.