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:
dougt%netscape.com
2002-01-29 21:22:13 +00:00
parent c014f42d9a
commit 011f9b10e5
76 changed files with 1470 additions and 1201 deletions

View File

@@ -40,6 +40,7 @@
#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
#include "nsSpecialSystemDirectory.h" // For exe dir
@@ -496,11 +497,12 @@ main(int argc, char **argv)
if (argc > 1)
numberOfThreads = atoi(argv[1]);
NS_InitXPCOM2(nsnull, nsnull, nsnull);
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
NULL /* default */);
nsCOMPtr<nsIServiceManager> servMan;
NS_InitXPCOM2(getter_AddRefs(servMan), nsnull, nsnull);
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(servMan);
NS_ASSERTION(registrar, "Null nsIComponentRegistrar");
registrar->AutoRegister(nsnull);
static PRThread** threads = (PRThread**) calloc(sizeof(PRThread*), numberOfThreads);
static PRThread* aEventThread;