зеркало из https://github.com/mozilla/pjs.git
Unset and reset the JS context global objects when doing ExplainLiveExpectedGarbage, just like when doing normal cycle collection. b=410116 r+sr=peterv Not part of default build (DEBUG_CC-only).
This commit is contained in:
Родитель
58d61560c6
Коммит
20be15cd34
|
@ -606,6 +606,8 @@ nsXPConnect::BeginCycleCollection(nsCycleCollectionTraversalCallback &cb)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsXPConnect::GetRuntime()->UnsetContextGlobals();
|
||||||
|
|
||||||
PRBool alreadyCollecting = mCycleCollecting;
|
PRBool alreadyCollecting = mCycleCollecting;
|
||||||
mCycleCollecting = PR_TRUE;
|
mCycleCollecting = PR_TRUE;
|
||||||
NoteJSRootTracer trc(&mJSRoots, cb);
|
NoteJSRootTracer trc(&mJSRoots, cb);
|
||||||
|
@ -650,6 +652,8 @@ nsXPConnect::FinishCycleCollection()
|
||||||
{
|
{
|
||||||
mCycleCollectionContext = nsnull;
|
mCycleCollectionContext = nsnull;
|
||||||
mExplainCycleCollectionContext = nsnull;
|
mExplainCycleCollectionContext = nsnull;
|
||||||
|
|
||||||
|
nsXPConnect::GetRuntime()->RestoreContextGlobals();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче