Bug 349069, Move more things from ~nsINode to nsNodeUtils::LastRelease, r+sr=sicking
This commit is contained in:
@@ -143,36 +143,7 @@ nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult);
|
||||
|
||||
nsINode::~nsINode()
|
||||
{
|
||||
NS_ASSERTION(!HasSlots(), "Don't know how to kill the slots");
|
||||
|
||||
if (HasFlag(NODE_HAS_RANGELIST)) {
|
||||
#ifdef DEBUG
|
||||
if (!nsContentUtils::LookupRangeList(this) &&
|
||||
nsContentUtils::IsInitialized()) {
|
||||
NS_ERROR("Huh, our bit says we have a range list, but there's nothing "
|
||||
"in the hash!?!!");
|
||||
}
|
||||
#endif
|
||||
|
||||
nsContentUtils::RemoveRangeList(this);
|
||||
}
|
||||
|
||||
if (HasFlag(NODE_HAS_LISTENERMANAGER)) {
|
||||
#ifdef DEBUG
|
||||
if (nsContentUtils::IsInitialized()) {
|
||||
nsCOMPtr<nsIEventListenerManager> manager;
|
||||
PRBool created;
|
||||
nsContentUtils::GetListenerManager(this, PR_FALSE,
|
||||
getter_AddRefs(manager), &created);
|
||||
if (!manager) {
|
||||
NS_ERROR("Huh, our bit says we have a listener manager list, "
|
||||
"but there's nothing in the hash!?!!");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
nsContentUtils::RemoveListenerManager(this);
|
||||
}
|
||||
NS_ASSERTION(!HasSlots(), "nsNodeUtils::LastRelease was not called?");
|
||||
}
|
||||
|
||||
void*
|
||||
@@ -1019,8 +990,6 @@ nsGenericElement::~nsGenericElement()
|
||||
{
|
||||
NS_PRECONDITION(!IsInDoc(),
|
||||
"Please remove this from the document properly");
|
||||
|
||||
nsNodeUtils::NodeWillBeDestroyed(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3092,7 +3061,7 @@ NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(nsGenericElement)
|
||||
NS_IMPL_RELEASE_WITH_DESTROY(nsGenericElement,
|
||||
nsNodeUtils::LastRelease(this))
|
||||
nsNodeUtils::LastRelease(this, PR_TRUE))
|
||||
|
||||
nsresult
|
||||
nsGenericElement::PostQueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
||||
Reference in New Issue
Block a user