mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Fix for bug 402535 (Cycle collection crashes with Leak Monitor extension installed). Pending-r=sicking, sr=jst, a=dsicore.
This commit is contained in:
parent
f25d1acc8d
commit
7d616bf099
@ -454,15 +454,19 @@ void XPCJSRuntime::UnsetContextGlobals()
|
|||||||
if(nsXPConnect::GetXPConnect()->GetRequestDepth(acx) == 0)
|
if(nsXPConnect::GetXPConnect()->GetRequestDepth(acx) == 0)
|
||||||
{
|
{
|
||||||
JS_ClearNewbornRoots(acx);
|
JS_ClearNewbornRoots(acx);
|
||||||
JSDHashEntryHdr* entry =
|
if(acx->globalObject)
|
||||||
JS_DHashTableOperate(&mClearedGlobalObjects, acx, JS_DHASH_ADD);
|
|
||||||
ClearedGlobalObject* clearedGlobal =
|
|
||||||
reinterpret_cast<ClearedGlobalObject*>(entry);
|
|
||||||
if(clearedGlobal)
|
|
||||||
{
|
{
|
||||||
clearedGlobal->mContext = acx;
|
JSDHashEntryHdr* entry =
|
||||||
clearedGlobal->mGlobalObject = acx->globalObject;
|
JS_DHashTableOperate(&mClearedGlobalObjects, acx,
|
||||||
acx->globalObject = nsnull;
|
JS_DHASH_ADD);
|
||||||
|
ClearedGlobalObject* clearedGlobal =
|
||||||
|
reinterpret_cast<ClearedGlobalObject*>(entry);
|
||||||
|
if(clearedGlobal)
|
||||||
|
{
|
||||||
|
clearedGlobal->mContext = acx;
|
||||||
|
clearedGlobal->mGlobalObject = acx->globalObject;
|
||||||
|
acx->globalObject = nsnull;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user