mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 772332 part 1 - Don't access siblings of nodes that might be deleted; r=ehsan
This commit is contained in:
parent
81be98cff9
commit
a72a488e1a
@ -2834,10 +2834,8 @@ nsHTMLEditRules::DeleteNonTableElements(nsINode* aNode)
|
||||
return mHTMLEditor->DeleteNode(aNode->AsDOMNode());
|
||||
}
|
||||
|
||||
for (nsCOMPtr<nsIContent> child = aNode->GetLastChild();
|
||||
child;
|
||||
child = child->GetPreviousSibling()) {
|
||||
nsresult rv = DeleteNonTableElements(child);
|
||||
for (PRInt32 i = aNode->GetChildCount() - 1; i >= 0; --i) {
|
||||
nsresult rv = DeleteNonTableElements(aNode->GetChildAt(i));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user