mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 571246 - Crash @nsCoreUtils::IsAncestorOf(nsINode*,nsINode*,nsINode*), r=bz, davidb
This commit is contained in:
parent
037e2ec128
commit
1cca3ad2d5
@ -320,7 +320,8 @@ nsCoreUtils::IsAncestorOf(nsINode *aPossibleAncestorNode,
|
||||
NS_ENSURE_TRUE(aPossibleAncestorNode && aPossibleDescendantNode, PR_FALSE);
|
||||
|
||||
nsINode *parentNode = aPossibleDescendantNode;
|
||||
while ((parentNode = parentNode->GetNodeParent()) != aRootNode) {
|
||||
while ((parentNode = parentNode->GetNodeParent()) &&
|
||||
parentNode != aRootNode) {
|
||||
if (parentNode == aPossibleAncestorNode)
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user