Add nsCycleCollector_shouldBeFreed calls for elements. b=385549 r+sr=jst

This commit is contained in:
dbaron@dbaron.org 2007-06-29 20:00:51 -07:00
Родитель 5a14674c88
Коммит 47eecdb023
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -123,6 +123,7 @@
#include "nsCycleCollectionParticipant.h"
#include "nsCCUncollectableMarker.h"
#include "nsCycleCollector.h"
#ifdef MOZ_SVG
PRBool NS_SVG_TestFeature(const nsAString &fstr);
@ -1089,6 +1090,9 @@ nsGenericElement::~nsGenericElement()
{
NS_PRECONDITION(!IsInDoc(),
"Please remove this from the document properly");
#ifdef DEBUG
nsCycleCollector_DEBUG_wasFreed(NS_STATIC_CAST(nsINode*, this));
#endif
}
NS_IMETHODIMP
@ -2104,6 +2108,9 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
}
nsNodeUtils::ParentChainChanged(this);
#ifdef DEBUG
nsCycleCollector_DEBUG_shouldBeFreed(NS_STATIC_CAST(nsINode*, this));
#endif
}
nsresult