зеркало из https://github.com/mozilla/pjs.git
Bug 503638 OOM crash [@ PL_DHashTableOperate | _MD_CURRENT_THREAD] in nsCycleCollector
r=dbaron
This commit is contained in:
Родитель
a2736cbe44
Коммит
ffcd231df9
|
@ -1377,6 +1377,7 @@ public:
|
||||||
GCGraphBuilder(GCGraph &aGraph,
|
GCGraphBuilder(GCGraph &aGraph,
|
||||||
nsCycleCollectionLanguageRuntime **aRuntimes);
|
nsCycleCollectionLanguageRuntime **aRuntimes);
|
||||||
~GCGraphBuilder();
|
~GCGraphBuilder();
|
||||||
|
bool Initialized();
|
||||||
|
|
||||||
PRUint32 Count() const { return mPtrToNodeMap.entryCount; }
|
PRUint32 Count() const { return mPtrToNodeMap.entryCount; }
|
||||||
|
|
||||||
|
@ -1430,6 +1431,12 @@ GCGraphBuilder::~GCGraphBuilder()
|
||||||
PL_DHashTableFinish(&mPtrToNodeMap);
|
PL_DHashTableFinish(&mPtrToNodeMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
GCGraphBuilder::Initialized()
|
||||||
|
{
|
||||||
|
return !!mPtrToNodeMap.ops;
|
||||||
|
}
|
||||||
|
|
||||||
PtrInfo*
|
PtrInfo*
|
||||||
GCGraphBuilder::AddNode(void *s, nsCycleCollectionParticipant *aParticipant
|
GCGraphBuilder::AddNode(void *s, nsCycleCollectionParticipant *aParticipant
|
||||||
IF_DEBUG_CC_PARAM(PRUint32 aLangID)
|
IF_DEBUG_CC_PARAM(PRUint32 aLangID)
|
||||||
|
@ -2581,6 +2588,8 @@ nsCycleCollector::BeginCollection()
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
GCGraphBuilder builder(mGraph, mRuntimes);
|
GCGraphBuilder builder(mGraph, mRuntimes);
|
||||||
|
if (!builder.Initialized())
|
||||||
|
return PR_FALSE;
|
||||||
|
|
||||||
#ifdef COLLECT_TIME_DEBUG
|
#ifdef COLLECT_TIME_DEBUG
|
||||||
PRTime now = PR_Now();
|
PRTime now = PR_Now();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче