Benjamin Smedberg wrote:

They key magic was that NS_DECLARE_STATIC_IID_ACCESSOR is specialized on the type itself and not on a dummy class.

I had tried specialising on the type itself, but the way I originally did it was only a link error rather than a compile error. I had also tried templating COMTypeInfo on two types, but my mistake was to move COMTypeInfo out of the class. If only I had realised that I could leave COMTypeInfo in the class as well as templating it on two types and specialising on the type itself then I would have ended up with your code.

The big treewide change that was required was to remove all the GetIID accessors and instead require NS_GET_IID.

I only know of three (two in nsISupportsImpl.h that you already know of, plus blassey added one to nsExternalSharingAppService.cpp).

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to