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:
@@ -1,6 +1,7 @@
|
||||
#include "nsILocalFile.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsMemory.h"
|
||||
@@ -60,14 +61,16 @@ main(int argc, char* argv[])
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsILocalFile> topDir;
|
||||
|
||||
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsCOMPtr<nsIServiceManager> servMan;
|
||||
rv = NS_InitXPCOM2(getter_AddRefs(servMan), nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) return -1;
|
||||
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, NULL);
|
||||
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(servMan);
|
||||
NS_ASSERTION(registrar, "Null nsIComponentRegistrar");
|
||||
registrar->AutoRegister(nsnull);
|
||||
|
||||
if (argc > 1 && argv[1] != nsnull)
|
||||
{
|
||||
char* pathStr = argv[1];
|
||||
char* pathStr = argv[1];
|
||||
NS_NewLocalFile(pathStr, PR_FALSE, getter_AddRefs(topDir));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user