mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158540 - Don't repeat the mRefCnt member of URLValue in ImageValue; r=dbaron
Even after this patch, it's not OK to AddRef an ImageValue and then call Release on its base pointer (URLValue) since URLValue refcounting methods are not virtual, so it would confuse the leak checker, but at least it wouldn't cause UAF issues since we'd still be looking at the same mRefCnt member.
This commit is contained in:
parent
ff7f03df2f
commit
c01a19936d
@ -2464,6 +2464,9 @@ css::ImageValue::~ImageValue()
|
||||
mRequests.Enumerate(&ClearRequestHashtable, this);
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(css::ImageValue)
|
||||
NS_IMPL_RELEASE(css::ImageValue)
|
||||
|
||||
nsCSSValueGradientStop::nsCSSValueGradientStop()
|
||||
: mLocation(eCSSUnit_None),
|
||||
mColor(eCSSUnit_Null),
|
||||
|
@ -137,9 +137,9 @@ public:
|
||||
|
||||
nsRefPtrHashtable<nsPtrHashKey<nsISupports>, imgRequestProxy> mRequests;
|
||||
|
||||
// Override AddRef and Release to not only log ourselves correctly, but
|
||||
// also so that we delete correctly without a virtual destructor
|
||||
NS_INLINE_DECL_REFCOUNTING(ImageValue)
|
||||
// Override AddRef and Release to log ourselves correctly.
|
||||
NS_METHOD_(MozExternalRefCountType) AddRef();
|
||||
NS_METHOD_(MozExternalRefCountType) Release();
|
||||
};
|
||||
|
||||
struct GridNamedArea {
|
||||
|
Loading…
Reference in New Issue
Block a user