On Tue, Jul 30, 2013 at 11:17 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 7/30/13 11:13 AM, Dave Townsend wrote:
>>
>> The JS promise implementation came out of a desire to use promises in
>> add-ons and devtools amongst others. I believe the C++ implementation came
>> out of the DOM spec. I'm not sure why we need both.
>
> OK.  Given that there is also a desire to be able to use the DOM Promises in
> b2g (see bug 897913), how do people feel about enabling the Promise API in
> at least chrome globals (and via Xrays), and setting up Promise in things
> like JS component globals as well?  This shouldn't be too difficult to do...
> Then anyone who wants to use Promises in Chrome code can use the DOM ones.

Sounds great. We'll need to investigate whether the implementations
are compatible, though - we've been going through various existing JS
consumers switching them to a different promise implementation
(Promise.jsm, https://bugzilla.mozilla.org/show_bug.cgi?id=856878
tracks several instances) and have been running into issues with
different behavior related to promise resolution. There is a
significant amount of existing chrome code using one of the two
existing JS implementations (Promise.jsm and core/promise.js from the
Add-on SDK), and porting them to DOM promises will take some effort.

Gavin
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to