On 30/07/2013 22.40, Andreas Gal wrote: > Whats the main pain point? Whether promises are resolved immediately or > from a future event loop iteration?
That. The migration from "core/promise.js" to "Promise.jsm" should address consumers expecting callbacks to be called immediately. "Promises.jsm" conforms to "Promises/A+" in guaranteeing that "then" returns before the callbacks it registers are invoked. It seems DOM Promises guarantee that too, so any possible migration from "Promise.jsm" to DOM Promises seems easier. Also, to clarify, "event loop" may refer to different things. We're not really going back to the operating system's event loop while there are still promises to resolve, for performance reasons (for example, when iterating over a chain of resolved promises created by "Task.jsm"). We have a "Promise.jsm" test suite that we should run on DOM Promises before migration, though subtle differences in the event loop model might still be uncaught in some edge cases. I expect this to have less impact than the current core/promise.js -> Promise.jsm migration. It's still a pity that we're not putting enough resources on the migration from core/promise.js to Promise.jsm (see bug 881047 and the mentioned dependencies of bug 856878). Most code that blocks migration is just made of test cases, rather than production code. Accelerating on bug 881047 would be great, to at least reduce our implementations from three to two :-) Cheers, Paolo _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform