Bug 772346 - Hold a strong ref to the child node in nsHTMLEditRules::DeleteNonTableElements; r=roc

--HG--
extra : rebase_source : 45e35f3c2ce9513a3e48fb801403ff59c0562412
This commit is contained in:
Ehsan Akhgari 2012-07-10 16:06:48 -04:00
parent 1db2d46270
commit 3591cf9669

View File

@ -2816,7 +2816,7 @@ nsHTMLEditRules::DeleteNonTableElements(nsINode* aNode)
return mHTMLEditor->DeleteNode(aNode->AsDOMNode());
}
for (nsIContent* child = aNode->GetLastChild();
for (nsCOMPtr<nsIContent> child = aNode->GetLastChild();
child;
child = child->GetPreviousSibling()) {
nsresult rv = DeleteNonTableElements(child);