Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Boris Zbarsky
On 4/19/18 3:53 PM, Gijs Kruitbosch wrote: If I understand correctly, with these changes I could now just use Promise instead. Not yet, as Andrew said. This just makes things declared as "interface Something { ... }" in .webidl files work. Promise is not one of those things. That said, I

Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Kris Maglione
On Thu, Apr 19, 2018 at 12:58:33PM -0700, Andrew McCreight wrote: On Thu, Apr 19, 2018 at 12:53 PM, Gijs Kruitbosch wrote: If I understand correctly, with these changes I could now just use Promise instead. Is that correct? Can I declare it including the resolution

Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Kris Maglione
\o/ On Wed, Apr 18, 2018 at 11:19:27PM -0400, Nika Layzell wrote: Yesterday, bug 1444991 landed on inbound, which adds support for using WebIDL defined objects directly inside of XPIDL definition files. This allows us to avoid using

Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Andrew McCreight
On Thu, Apr 19, 2018 at 12:53 PM, Gijs Kruitbosch wrote: > Dumb question because I don't do this very often - sorry! > > I am intending to async-ify a sync JS-implemented idl-defined API (which > currently returns an unsigned long), that has a few C++ consumers. I was >

Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Gijs Kruitbosch
Dumb question because I don't do this very often - sorry! I am intending to async-ify a sync JS-implemented idl-defined API (which currently returns an unsigned long), that has a few C++ consumers. I was thinking the simplest solution would be a separate method definition in the idl that took

Re: Using WebIDL objects in XPIDL

2018-04-19 Thread Boris Zbarsky
On 4/18/18 11:19 PM, Nika Layzell wrote: This allows us to avoid using nsISupports to pass WebIDL objects which don't have corresponding XPIDL interfaces through XPIDL defined methods. This is awesome. In particular, it means we can pass WebIDL things through XPIDL without adding weird "QI

Re: Using WebIDL objects in XPIDL

2018-04-18 Thread Cameron McCormack
On Thu, Apr 19, 2018, at 1:19 PM, Nika Layzell wrote: > This allows us to avoid using nsISupports to pass WebIDL objects which > don't have corresponding XPIDL interfaces through XPIDL defined methods. Thanks Nika, this is great! Avoiding nsIDOMBlah interfaces in C++ was one of the reasons that

Using WebIDL objects in XPIDL

2018-04-18 Thread Nika Layzell
Yesterday, bug 1444991 landed on inbound, which adds support for using WebIDL defined objects directly inside of XPIDL definition files. This allows us to avoid using nsISupports to pass WebIDL objects which don't have corresponding XPIDL