On 3/6/2014 8:32 PM, Neil wrote:
Because of the way GetIID/NS_GET_IID works, it's not very easy to get the compiler to tell you when you're doing it wrong. So far I've come up with a way to get the linker to do it. I'm trying to get the compiler to do it, but the results aren't perfect. However along the way I have noticed some common mistakes regarding IIDs.
I had a patch long ago for this in bug 514280 which I still want to resurrect but haven't found time. It built, even! If somebody wants to steal this from me please go ahead.
They key magic was that NS_DECLARE_STATIC_IID_ACCESSOR is specialized on the type itself and not on a dummy class.
The big treewide change that was required was to remove all the GetIID accessors and instead require NS_GET_IID.
--BDS _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform