Bug 983285 - Add a generic destructor for property values allocated with new. r=kats, r=bz

This commit is contained in:
Gorman Ho
2014-03-25 09:25:47 -04:00
parent bbf1c66d6c
commit ab8b32472a
15 changed files with 34 additions and 185 deletions

View File

@@ -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)