mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 735550 - unmark gray objects held by live nsXBLDocGlobalObjects. r=smaug
This commit is contained in:
parent
a8485fd9e9
commit
a7c876f89d
@ -97,6 +97,8 @@ public:
|
||||
|
||||
void ClearGlobalObjectOwner();
|
||||
|
||||
void UnmarkScriptContext();
|
||||
|
||||
protected:
|
||||
virtual ~nsXBLDocGlobalObject();
|
||||
|
||||
@ -360,6 +362,14 @@ nsXBLDocGlobalObject::ClearGlobalObjectOwner()
|
||||
mGlobalObjectOwner = nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
nsXBLDocGlobalObject::UnmarkScriptContext()
|
||||
{
|
||||
if (mScriptContext) {
|
||||
xpc_UnmarkGrayObject(mScriptContext->GetNativeGlobal());
|
||||
}
|
||||
}
|
||||
|
||||
JSObject *
|
||||
nsXBLDocGlobalObject::GetGlobalJSObject()
|
||||
{
|
||||
@ -509,9 +519,13 @@ nsXBLDocumentInfo::MarkInCCGeneration(PRUint32 aGeneration)
|
||||
if (mDocument) {
|
||||
mDocument->MarkUncollectableForCCGeneration(aGeneration);
|
||||
}
|
||||
// Unmark any JS we hold
|
||||
if (mBindingTable) {
|
||||
mBindingTable->Enumerate(UnmarkProtos, nsnull);
|
||||
}
|
||||
if (mGlobalObject) {
|
||||
mGlobalObject->UnmarkScriptContext();
|
||||
}
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsXBLDocumentInfo)
|
||||
|
Loading…
Reference in New Issue
Block a user