Fix for bug 458397 (Memory leak during TopSite Test on http://www.grono.net). r=bent, sr=jst.

This commit is contained in:
Peter Van der Beken 2008-11-27 18:44:26 +01:00
Родитель caed414e9b
Коммит b12295dfc9
2 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -144,8 +144,14 @@ nsComputedDOMStyle::Shutdown()
}
NS_IMPL_CYCLE_COLLECTION_CLASS(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mContent)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
// QueryInterface implementation for nsComputedDOMStyle
NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsComputedDOMStyle)
NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle)
NS_INTERFACE_MAP_ENTRY(nsICSSDeclaration)
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
@ -170,9 +176,9 @@ static void doDestroyComputedDOMStyle(nsComputedDOMStyle *aComputedStyle)
}
}
NS_IMPL_ADDREF(nsComputedDOMStyle)
NS_IMPL_RELEASE_WITH_DESTROY(nsComputedDOMStyle,
doDestroyComputedDOMStyle(this))
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsComputedDOMStyle,
doDestroyComputedDOMStyle(this))
NS_IMETHODIMP

Просмотреть файл

@ -59,7 +59,8 @@
class nsComputedDOMStyle : public nsIComputedDOMStyle
{
public:
NS_DECL_ISUPPORTS
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsComputedDOMStyle)
NS_IMETHOD Init(nsIDOMElement *aElement,
const nsAString& aPseudoElt,