mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062832 - Use nsRefPtr in the filter references array instead of manual refcounting. r=roc
This commit is contained in:
parent
f245bd4c4e
commit
f06f1f5f0f
@ -223,20 +223,12 @@ nsSVGFilterProperty::nsSVGFilterProperty(const nsTArray<nsStyleFilter> &aFilters
|
||||
if (aFilters[i].GetType() != NS_STYLE_FILTER_URL)
|
||||
continue;
|
||||
|
||||
nsSVGFilterReference *reference =
|
||||
nsRefPtr<nsSVGFilterReference> reference =
|
||||
new nsSVGFilterReference(aFilters[i].GetURL(), aFilteredFrame);
|
||||
NS_ADDREF(reference);
|
||||
mReferences.AppendElement(reference);
|
||||
}
|
||||
}
|
||||
|
||||
nsSVGFilterProperty::~nsSVGFilterProperty()
|
||||
{
|
||||
for (uint32_t i = 0; i < mReferences.Length(); i++) {
|
||||
NS_RELEASE(mReferences[i]);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGFilterProperty::ReferencesValidResources()
|
||||
{
|
||||
|
@ -214,10 +214,10 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
protected:
|
||||
virtual ~nsSVGFilterProperty();
|
||||
virtual ~nsSVGFilterProperty() {}
|
||||
|
||||
private:
|
||||
nsTArray<nsSVGFilterReference*> mReferences;
|
||||
nsTArray<nsRefPtr<nsSVGFilterReference>> mReferences;
|
||||
};
|
||||
|
||||
class nsSVGMarkerProperty : public nsSVGIDRenderingObserver {
|
||||
|
Loading…
Reference in New Issue
Block a user