Bug 21033. Delete broadcast listeners in Slots dtor. thanks beard!

This commit is contained in:
waterson%netscape.com 1999-12-08 07:18:59 +00:00
parent 0e5acf581a
commit a377d5e847
2 changed files with 12 additions and 0 deletions

View File

@ -298,6 +298,9 @@ nsXULElement::nsXULElement()
mParent(nsnull),
mChildren(nsnull),
mScriptObject(nsnull),
#ifdef DEBUG
mHaveRootedScriptObject(PR_FALSE),
#endif
mLazyState(0),
mSlots(nsnull)
{
@ -363,6 +366,7 @@ nsXULElement::Init()
nsXULElement::~nsXULElement()
{
NS_ASSERTION(! mHaveRootedScriptObject, "script object still rooted!");
delete mSlots;
//NS_IF_RELEASE(mDocument); // not refcounted
@ -3681,6 +3685,8 @@ nsXULElement::Slots::~Slots()
mElement->RemoveBroadcastListener("*", xulListener->mListener);
}
delete mBroadcastListeners;
}
// Delete the aggregated interface, if one exists.

View File

@ -298,6 +298,9 @@ nsXULElement::nsXULElement()
mParent(nsnull),
mChildren(nsnull),
mScriptObject(nsnull),
#ifdef DEBUG
mHaveRootedScriptObject(PR_FALSE),
#endif
mLazyState(0),
mSlots(nsnull)
{
@ -363,6 +366,7 @@ nsXULElement::Init()
nsXULElement::~nsXULElement()
{
NS_ASSERTION(! mHaveRootedScriptObject, "script object still rooted!");
delete mSlots;
//NS_IF_RELEASE(mDocument); // not refcounted
@ -3681,6 +3685,8 @@ nsXULElement::Slots::~Slots()
mElement->RemoveBroadcastListener("*", xulListener->mListener);
}
delete mBroadcastListeners;
}
// Delete the aggregated interface, if one exists.