mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 21033. Delete broadcast listeners in Slots dtor. thanks beard!
This commit is contained in:
parent
0e5acf581a
commit
a377d5e847
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user