1. Converts callers of nsIComponentManagerObsolete to use
nsIComponentRegistrar. 2. Converts callers of nsComponentManager::AutoRegister to use nsIComponentRegistrar's autoRegistrar method. 3. Add nsIComponentRegistrar implmentation to nsComponentManagerImpl. 4. Rearrange nsComponentManager.cpp so that related methods are in the same place. 5. Added a C-style function NS_GetComponentRegistrar so that getting the registrar is easier in some places. 6. Added a nsISimpleEnumerator interface on PLDHashTableEnumeratorImpl. in this way, the same base class can support both old style and new style enumerations. 7. Fixed a nasty bug where unregistring factories will leave the contract id hash with a dangling pointer. Now, when unregister is called we search the contract id hash for entries which have the given doomned cid and remove them. Bug 115853. r=dp@netscape.com, sr=rpotts@netscape.com git-svn-id: svn://10.0.0.236/trunk@113143 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
#include "nsIStringBundle.h"
|
||||
@@ -106,8 +107,15 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
|
||||
// Register components
|
||||
if (!sRegistryInitializedFlag)
|
||||
{
|
||||
rv = nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(sServiceManager, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
NS_ASSERTION(PR_FALSE, "Could not QI to registrar");
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = registrar->AutoRegister(nsnull);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
NS_ASSERTION(PR_FALSE, "Could not AutoRegister");
|
||||
|
||||
Reference in New Issue
Block a user