Bug 462497. Don't reacquire a monitor in nsComponentManagerImpl::HashContractID that we already hold. r=bsmedberg

--HG--
extra : rebase_source : 5a024be37b8d28025f24b207d9622c1b597daea0
This commit is contained in:
Sergey Yanovich 2009-01-08 21:41:55 +13:00
parent 3800db375c
commit a9bc176a99
2 changed files with 5 additions and 1 deletions

View File

@ -84,6 +84,7 @@
#include "xptinfo.h" // this after nsISupports, to pick up IID so that xpt stuff doesn't try to define it itself...
#include "nsThreadUtils.h"
#include "prthread.h"
#include "private/pprthred.h"
#include "nsInt64.h"
#include "nsManifestLineReader.h"
@ -1298,7 +1299,7 @@ nsComponentManagerImpl::HashContractID(const char *aContractID,
if(!aContractID || !aContractIDLen)
return NS_ERROR_NULL_POINTER;
nsAutoMonitor mon(mMon);
NS_ABORT_IF_FALSE(PR_InMonitor(mMon), "called from outside mMon");
nsContractIDTableEntry* contractIDTableEntry =
static_cast<nsContractIDTableEntry*>

View File

@ -213,6 +213,9 @@ public:
nsFactoryEntry *GetFactoryEntry(const nsCID &aClass);
nsresult SyncComponentsInDir(PRInt32 when, nsIFile *dirSpec);
// NOTE: HashContractID operates on the hash table with ContractIDs,
// for thread-safety it should only be invoked from inside mMon.
nsresult HashContractID(const char *acontractID, PRUint32 aContractIDLen,
nsFactoryEntry *fe_ptr);