зеркало из 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:
Родитель
993990d18c
Коммит
1eb0636337
|
@ -606,6 +606,8 @@ nsXPConnect::BeginCycleCollection(nsCycleCollectionTraversalCallback &cb)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsXPConnect::GetRuntime()->UnsetContextGlobals();
|
||||
|
||||
PRBool alreadyCollecting = mCycleCollecting;
|
||||
mCycleCollecting = PR_TRUE;
|
||||
NoteJSRootTracer trc(&mJSRoots, cb);
|
||||
|
@ -650,6 +652,8 @@ nsXPConnect::FinishCycleCollection()
|
|||
{
|
||||
mCycleCollectionContext = nsnull;
|
||||
mExplainCycleCollectionContext = nsnull;
|
||||
|
||||
nsXPConnect::GetRuntime()->RestoreContextGlobals();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче