зеркало из https://github.com/mozilla/gecko-dev.git
fix for blocker bug #106646. hyatt's hack applied to the ContentReplaced() case.
sr=hyatt.
This commit is contained in:
Родитель
b227e18dfe
Коммит
28d481fe6c
|
@ -2117,6 +2117,15 @@ nsXULDocument::ContentReplaced(nsIContent* aContainer,
|
|||
nsIDocumentObserver* observer = (nsIDocumentObserver*)mObservers[i];
|
||||
observer->ContentReplaced(this, aContainer, aOldChild, aNewChild,
|
||||
aIndexInContainer);
|
||||
|
||||
// XXXdwh hack to avoid crash, since an observer removes itself
|
||||
// during ContentReplaced.
|
||||
PRInt32 newCount = mObservers.Count();
|
||||
if (newCount < count) {
|
||||
PRInt32 diff = (count - newCount);
|
||||
count -= diff;
|
||||
i -= diff;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче