On 10/7/12 4:13 PM, Ehsan Akhgari wrote:
Nice! Can you please share some info on when you can avoid inheriting from nsISupports and whether we can make the cycle collector aware of such objects?
Basically, the rules are as follows: 1) You need to either not need cycle collection (e.g. because you have no wrapper cache and no strong ref members) or need to implement the "native" CC stuff as Andrew described. 2) Your class must not be the return value of any XPIDL interface, since those go through xpconnect and xpconnect can only deal with nsISupports stuff. The good news is that you can't violate this rule and still compile unless your patch involves reinterpret_cast to nsIWhatever, which will hopefully get you a swift r-. ;) So for example, document.implementation can't drop the nsISupports yet, because Document is done via nsIDOMDocument. But once we convert Document to WebIDL, we'll be able to drop nsISupports there... -Boris _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform