Fixed bug caused during XPCOM'ing the nsIContent API
git-svn-id: svn://10.0.0.236/trunk@9555 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
5e56e0d9f0
commit
e8824a34c4
@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
|
||||
if (index+1 < count) {
|
||||
parent->ChildAt(index+1, result);
|
||||
// Get first child down the tree
|
||||
PRInt32 n;
|
||||
result->ChildCount(n);
|
||||
while (n > 0) {
|
||||
for (;;) {
|
||||
PRInt32 n;
|
||||
result->ChildCount(n);
|
||||
if (n <= 0) {
|
||||
break;
|
||||
}
|
||||
nsIContent * old = result;
|
||||
old->ChildAt(0, result);
|
||||
NS_RELEASE(old);
|
||||
|
||||
@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
|
||||
if (index+1 < count) {
|
||||
parent->ChildAt(index+1, result);
|
||||
// Get first child down the tree
|
||||
PRInt32 n;
|
||||
result->ChildCount(n);
|
||||
while (n > 0) {
|
||||
for (;;) {
|
||||
PRInt32 n;
|
||||
result->ChildCount(n);
|
||||
if (n <= 0) {
|
||||
break;
|
||||
}
|
||||
nsIContent * old = result;
|
||||
old->ChildAt(0, result);
|
||||
NS_RELEASE(old);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user