Trivial code cleanup, no bug. Removing unused variable and using nsCOMPtr in stead of doing manual addref/release. r=harishd@netscape.com

git-svn-id: svn://10.0.0.236/trunk@84601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com
2001-01-08 22:16:52 +00:00
parent 6d307a92ff
commit 1f3e4f888b
2 changed files with 6 additions and 14 deletions

View File

@@ -1281,14 +1281,10 @@ nsHTMLDocument::ContentAppended(nsIContent* aContainer,
PRInt32 aNewIndexInContainer)
{
if (nsnull != mNamedItems) {
nsIContent* child;
nsIAtom *name;
nsCOMPtr<nsIAtom> name;
aContainer->GetTag(name);
aContainer->ChildAt(aNewIndexInContainer, child);
RegisterNamedItems(aContainer, name == nsHTMLAtoms::form);
NS_IF_RELEASE(child);
NS_IF_RELEASE(name);
aContainer->GetTag(*getter_AddRefs(name));
RegisterNamedItems(aContainer, name.get() == nsHTMLAtoms::form);
}
return nsDocument::ContentAppended(aContainer, aNewIndexInContainer);