mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 499608. Fix leak of nsSVGRenderingObserverList frame property. r=jwatt
--HG-- extra : rebase_source : 46c93829cd467ca651df225003586d84043e173d
This commit is contained in:
parent
001a8ce4ef
commit
67b25a2f2a
@ -426,6 +426,15 @@ GetObserverList(nsIFrame *aFrame)
|
|||||||
return static_cast<nsSVGRenderingObserverList*>(aFrame->GetProperty(nsGkAtoms::observer));
|
return static_cast<nsSVGRenderingObserverList*>(aFrame->GetProperty(nsGkAtoms::observer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
DeleteObserverList(void *aObject,
|
||||||
|
nsIAtom *aPropertyName,
|
||||||
|
void *aPropertyValue,
|
||||||
|
void *aData)
|
||||||
|
{
|
||||||
|
delete static_cast<nsSVGRenderingObserverList*>(aPropertyValue);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSVGEffects::AddRenderingObserver(nsIFrame *aFrame, nsSVGRenderingObserver *aObserver)
|
nsSVGEffects::AddRenderingObserver(nsIFrame *aFrame, nsSVGRenderingObserver *aObserver)
|
||||||
{
|
{
|
||||||
@ -439,7 +448,7 @@ nsSVGEffects::AddRenderingObserver(nsIFrame *aFrame, nsSVGRenderingObserver *aOb
|
|||||||
for (nsIFrame* f = aFrame; f; f = f->GetNextContinuation()) {
|
for (nsIFrame* f = aFrame; f; f = f->GetNextContinuation()) {
|
||||||
f->AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED_OR_HAVE_RENDERING_OBSERVERS);
|
f->AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED_OR_HAVE_RENDERING_OBSERVERS);
|
||||||
}
|
}
|
||||||
aFrame->SetProperty(nsGkAtoms::observer, observerList);
|
aFrame->SetProperty(nsGkAtoms::observer, observerList, DeleteObserverList);
|
||||||
}
|
}
|
||||||
observerList->Add(aObserver);
|
observerList->Add(aObserver);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user