Philip Langdale wrote:

> Heh, actually nsIComponentManager::RegisterComponentSpec. This is actually
> how we are handling things now but it's not what we want. To use Register*
> functions, you specify the individual component inside the module that
> you want to register. You have to do this for each component.
> The AutoRegisterComponent function enumerates through all components in
> a module and registers them. Unfortunately, it makes a persistant
> registration and demands write access to the mozilla directory. Neither
> attribute is wanted by us.


If your component doesn't ask for a persistent registration (pass false 
for the aPersist parameter to RegisterComponentWithType within your 
nsIModule::registerSelf implementation), we shouldn't write anything to 
the registry.  And simply calling AutoRegisterComponent on such a 
non-persistent component shouldn't require write access to the registry[*].

[*] So much here is broken:

  - I think that the (auto-)registering caller, not the component, 
should decide if the registration operations have permanent effect; and

  - if we can't write to the registry because of permissions or 
whatever, then RegisterComponentWithType should return an appropriate 
error code all the way out the registration call chain, and I don't 
think it does; and

  - I bet dollars to donuts that we're not very "lazy" about trying to 
get write access to the registry in the AutoRegisterComponent case, but 
I might be misremembering.

I'd love to be wrong about the last two.  But I think I'm not, so I'll 
try to remember to file some bugs tomorrow when I get up -- need sleep now.

Mike


Reply via email to