Removing monitor from FreeService() call. See bug 117218 for details, but basically we can run into a deadlock at shutdown. This patch assumes that (a) gXPCOMShuttingDown is set only by the UI thread during xpcom shutdown and (b) that all public API's check this flag before calling into the hashtable. r=dbaron@fas.harvard.edu, sr=brendan@mozilla.org

This commit is contained in:
dougt%netscape.com 2002-01-12 23:35:57 +00:00
Родитель 5952b13ce9
Коммит e99ddaaeee
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1719,7 +1719,10 @@ FreeServiceContractIDEntryEnumerate(PLDHashTable *aTable,
nsresult
nsComponentManagerImpl::FreeServices()
{
nsAutoMonitor mon(mMon);
NS_ASSERTION(gXPCOMShuttingDown, "Must be shutting down in order to free all services");
if (!gXPCOMShuttingDown)
return NS_ERROR_FAILURE;
if (mFactories.ops) {
PL_DHashTableEnumerate(&mFactories, FreeServiceFactoryEntryEnumerate, nsnull);