My change does NOT effect the creation of a component registration. The API reads "This function ensures XPCOM is started, creates the component registry *if necessary*". If a registry exists, XPCOM will use it. If no registry exists, XPCOM will cause autoregistration which produces a registry. The change, as I stated before, disables automatic component discovery and registration to be run in an optimized build. This should be a startup performance improvement for *all* embedders.
Thanks, Doug Turner Judson Valeski wrote: > Does this mod impact the creation of the component registry itself in > an optimized build? If so, we need to back this out as it breaks the > frozen semantics of the function > (http://lxr.mozilla.org/seamonkey/source/embedding/base/nsEmbedAPI.h#41 > ). Frozen=Frozen=Frozen. > > Jud > > Doug Turner wrote: > >> NS_InitEmbedding no longer causes XPCOM component discovery and >> registration (autoreg) in optimized builds. If your application >> requires automatic component discovery and registration to be run in >> an optimized build, you can add this code: >> >> #include "nsXPCOM.h" >> ... >> nsCOMPtr<nsIComponentRegistrar> registrar; >> nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(registrar)); >> if (NS_FAILURE(rv)) return rv; >> rv = registrar->AutoRegister(nsnull); >> ... >> >> This message only applies to the mozilla trunk. >> >> -- >> Doug Turner >> [EMAIL PROTECTED] >> >> > >
