On 1/30/14 9:06 AM, Boris Zbarsky wrote: > On 1/30/14 5:03 AM, Till Schneidereit wrote: >> What are the plans for moving Promises into SpiderMonkey? > > Moving Promises per se is not hard. > > The hard part is that this requires SpiderMonkey to grow a concept of > an even loop.
The event loop itself would still be implemented by Gecko. Promises really just need to be able to post events to it. Or "microtasks" as they are called in the specification. The necessary API surface is not much; here's a sketch: https://gist.github.com/jorendorff/8724830 However, a Promise would then be a kind of JSObject, the Promise API would be a JS-language API, and the JSAPI doesn't do a good job of exposing those to C++ code. DOM bindings are better at it. -j _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform