Mike Shaver wrote:
> Doug Turner wrote:
>
>>> Who needs the service manager but doesn't get it through their
>>> nsIModule thing?
>>
>>
>> It will be a requirement of the 'glue' helper library that we are
>> creating. A similar API will be NS_GetComponentManager().
>
>
>
> Why is it a requirement? (Where can I find these requirements?)
>
> I thought the glue library was going to prevent people from having to
> link to libxpcom, by letting them pull in some things
> (nsGenericFactory, nsCOMPtr, etc.) that they are currently linking
> for, and therefore at risk from changes to.
>
> It looks like the stuff in your patch doesn't do that, because it
> still calls through to NS_GetServiceManager and therefore has a
> link-time dependency on some symbol in libxpcom.
>
> What am I missing here?
The glue library will isolate consumers from linking to XPCOM for most
of the C++ helper code that is currently exported.. However, in order
to make the glue code still work we still need to call "a small subset "
of XPCOMs C APIs... For example, in order to make 'do_GetService(...)'
work we need to be able to get the Service Manager...
After the C++ helper code has been factored into a separate library, we
are planning on building (an optional) "shim" library which will further
isolate consumers from the xpcom dll by providing late bound
implementations of the XPCOM C APIs that are required by the glue...
This way, if one chooses to link with the 'shim library' then there is
no link-time dependency on the XPCOM dll...
Here is a little diagram of the libraries involved:
client code
|
+
XPCOM glue code
static lib
| |
+ +
(link time ) XPCOM -OR- shim code
(dependency) dll static lib
:
: (runtime dependency)
+
XPCOM
dll
>
> (I also don't like the addition of NS_CreateServicesFromCategory,
> least of all in an IDL file! I'll comment in the bug in a bit.)
>
>>> document and support?
>>
>>
>> I don't think that we have a choice. We need public methods to get
>> to the service manager and component manager.
>
>
>
> Why? Who needs them? If there are people who don't get the component
> manager-cum-service manager through their nsIModule calls, I agree
> completely. But I can't think of who those would be.
>
> Mike
>