Bug 416383, call nsDOMAttributeMap::DropReference() when unlinking elements ([@nsDOMAttribute::GetValue(nsAString_internal&)]), r+sr=sicking, a=mtschrep

This commit is contained in:
2008-02-11 02:36:50 -08:00
parent c6f9aad0b0
commit 06cf9363b2
3 changed files with 52 additions and 1 deletions

View File

@@ -3400,7 +3400,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGenericElement)
{
nsDOMSlots *slots = tmp->GetExistingDOMSlots();
if (slots) {
slots->mAttributeMap = nsnull;
if (slots->mAttributeMap) {
slots->mAttributeMap->DropReference();
slots->mAttributeMap = nsnull;
}
if (tmp->IsNodeOfType(nsINode::eXUL))
NS_IF_RELEASE(slots->mControllers);
}