On 30/07/2013 16.20, janjongb...@gmail.com wrote:
> From code I can use Cu.import("resource://gre/modules/Promise.jsm"); to use 
> promises. But is it possible to have a promise as a return type in my .idl 
> file (b2g)?

For the record, if you want to pass a "Promise.jsm" promise through an
XPCOM interface, you may just declare the type as "jsval".

We did this in the Session Restore component:

http://hg.mozilla.org/mozilla-central/file/1cb62de4332d/browser/components/sessionstore/nsISessionStore.idl#l31

(This code has since been refactored for unrelated reasons.)

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

Reply via email to