зеркало из https://github.com/mozilla/gecko-dev.git
Fixed bug caused during XPCOM'ing the nsIContent API
This commit is contained in:
Родитель
56d75edefe
Коммит
9a502dcf07
|
@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
|
||||||
if (index+1 < count) {
|
if (index+1 < count) {
|
||||||
parent->ChildAt(index+1, result);
|
parent->ChildAt(index+1, result);
|
||||||
// Get first child down the tree
|
// Get first child down the tree
|
||||||
PRInt32 n;
|
for (;;) {
|
||||||
result->ChildCount(n);
|
PRInt32 n;
|
||||||
while (n > 0) {
|
result->ChildCount(n);
|
||||||
|
if (n <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
nsIContent * old = result;
|
nsIContent * old = result;
|
||||||
old->ChildAt(0, result);
|
old->ChildAt(0, result);
|
||||||
NS_RELEASE(old);
|
NS_RELEASE(old);
|
||||||
|
|
|
@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
|
||||||
if (index+1 < count) {
|
if (index+1 < count) {
|
||||||
parent->ChildAt(index+1, result);
|
parent->ChildAt(index+1, result);
|
||||||
// Get first child down the tree
|
// Get first child down the tree
|
||||||
PRInt32 n;
|
for (;;) {
|
||||||
result->ChildCount(n);
|
PRInt32 n;
|
||||||
while (n > 0) {
|
result->ChildCount(n);
|
||||||
|
if (n <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
nsIContent * old = result;
|
nsIContent * old = result;
|
||||||
old->ChildAt(0, result);
|
old->ChildAt(0, result);
|
||||||
NS_RELEASE(old);
|
NS_RELEASE(old);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче