On 8/14/17 8:52 AM, Enrico Weigelt, metux IT consult wrote:
I wonder what exactly the CID's (*_CID defines) are for. IIRC, the classes are looked up via their contract-IDs (*_CONTRACTID defines), but I haven't seen anything that actually uses the CIDs.
The actual process is that when you createInstance or getService via contractid, the CID for that contractid is looked up, then the constructor for that CID is looked up and called.
In particular, it's possible to have multiple classes that define the same contractid (allowing overriding of the default behavior for that contractid), but they must still have distinct CIDs.
It's also possible to create instances or get references to services by CID directly, when you really need a particular implementation and want to ignore contract overrides.
-Boris _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform