Fixed bug caused during XPCOM'ing the nsIContent API

This commit is contained in:
kipp%netscape.com 1998-09-08 22:32:32 +00:00
Родитель 56d75edefe
Коммит 9a502dcf07
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -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);