On Thu, Dec 12, 2019 at 09:30:06AM -0500, Boris Zbarsky wrote:
On 12/10/19 3:31 PM, Kris Maglione wrote:
In what way is dom::Promise annoying to use from C++?
The one thing I know about that's pretty annoying is if you receive
the promise from someone else and want to add reactions to it.
PromiseNativeHandler kinda works, but then you get JS::Values and have
to extract the things you care about from them manually, which is a
bit of a pain.
Note that you can also use `ThenWithCycleCollectedArgs` and
`ThenWithoutCycleCollection` to add reactions from native code, which is
a lot easier than `PromiseNativeHandler`. You do still need to manually
deal with JS::Values, though.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform