Bug 983285 - Add a generic destructor for property values allocated with new. r=kats, r=bz
This commit is contained in:
@@ -13,15 +13,6 @@
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
void
|
||||
IntPointDtorFunc(void *aObject, nsIAtom *aPropertyName,
|
||||
void *aPropertyValue, void *aData)
|
||||
{
|
||||
nsIntPoint *propertyValue = static_cast<nsIntPoint*>(aPropertyValue);
|
||||
delete propertyValue;
|
||||
}
|
||||
|
||||
|
||||
typedef nsImageFrame nsImageControlFrameSuper;
|
||||
class nsImageControlFrame : public nsImageControlFrameSuper,
|
||||
public nsIFormControlFrame
|
||||
@@ -107,7 +98,7 @@ nsImageControlFrame::Init(nsIContent* aContent,
|
||||
|
||||
mContent->SetProperty(nsGkAtoms::imageClickedPoint,
|
||||
new nsIntPoint(0, 0),
|
||||
IntPointDtorFunc);
|
||||
nsINode::DeleteProperty<nsIntPoint>);
|
||||
}
|
||||
|
||||
NS_QUERYFRAME_HEAD(nsImageControlFrame)
|
||||
|
||||
Reference in New Issue
Block a user