Bug 338312 - destruction of an object with paint server set could crash.

r+sr=roc
This commit is contained in:
tor%cs.brown.edu 2006-05-24 18:20:20 +00:00
parent 4a5c599083
commit 1308778490
2 changed files with 6 additions and 2 deletions

View File

@ -56,12 +56,16 @@ nsSVGGeometryFrame::nsSVGGeometryFrame(nsStyleContext* aContext)
{
}
nsSVGGeometryFrame::~nsSVGGeometryFrame()
void
nsSVGGeometryFrame::Destroy()
{
// Do this here instead of in the destructor, so virtual calls still work
if (mFillServer)
mFillServer->RemoveObserver(this);
if (mStrokeServer)
mStrokeServer->RemoveObserver(this);
nsSVGGeometryFrameBase::Destroy();
}
nsSVGPaintServerFrame *

View File

@ -59,9 +59,9 @@ class nsSVGGeometryFrame : public nsSVGGeometryFrameBase,
{
public:
nsSVGGeometryFrame(nsStyleContext *aContext);
~nsSVGGeometryFrame();
// nsIFrame interface:
virtual void Destroy();
NS_IMETHOD DidSetStyleContext();
// nsISupports interface: