On 12/5/19 5:20 PM, Geoff Lankow wrote:
I'm redesigning a bunch of Thunderbird things to be asynchronous. I'd like to use Promises but a lot of the time I'll be far from a JS context
Is that because both the implementation of the API and the consumer of the API will be C++?
For what it's worth, you are never far from a JSContext; AutoJSAPI will give you one. The hard part may be finding an appropriate global to use...
In general, if the consumer or implementor of the API is JS, I would use JS promises. If this is all in C++ land, MozPromise works fine, afaict.
-Boris _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform