Fix for bug 393035 (nsNSElementTearoff should participate in cycle collection). r/sr=jst, a=sicking.

This commit is contained in:
peterv@propagandism.org 2007-09-02 03:45:36 -07:00
parent cc958eb963
commit c80fbbcfe1
2 changed files with 8 additions and 3 deletions

View File

@ -674,12 +674,15 @@ nsNode3Tearoff::IsDefaultNamespace(const nsAString& aNamespaceURI,
//----------------------------------------------------------------------
NS_IMPL_CYCLE_COLLECTION_1(nsNSElementTearoff, mContent)
NS_INTERFACE_MAP_BEGIN(nsNSElementTearoff)
NS_INTERFACE_MAP_ENTRY(nsIDOMNSElement)
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsNSElementTearoff)
NS_INTERFACE_MAP_END_AGGREGATED(mContent)
NS_IMPL_ADDREF(nsNSElementTearoff)
NS_IMPL_RELEASE(nsNSElementTearoff)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNSElementTearoff)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsNSElementTearoff)
NS_IMETHODIMP
nsNSElementTearoff::GetElementsByClassName(const nsAString& aClasses,

View File

@ -1055,10 +1055,12 @@ _elementName::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const \
class nsNSElementTearoff : public nsIDOMNSElement
{
public:
NS_DECL_ISUPPORTS
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIDOMNSELEMENT
NS_DECL_CYCLE_COLLECTION_CLASS(nsNSElementTearoff)
nsNSElementTearoff(nsGenericElement *aContent) : mContent(aContent)
{
}