зеркало из https://github.com/mozilla/gecko-dev.git
setting parent to null to make sure there are no dnagling pointers from children
to their parents b=44266, r=jst
This commit is contained in:
Родитель
b2966d97ba
Коммит
6f13208339
|
@ -3233,6 +3233,7 @@ nsGenericHTMLContainerElement::~nsGenericHTMLContainerElement()
|
|||
PRInt32 n = mChildren.Count();
|
||||
for (PRInt32 i = 0; i < n; i++) {
|
||||
nsIContent* kid = (nsIContent *)mChildren.ElementAt(i);
|
||||
kid->SetParent(nsnull);
|
||||
NS_RELEASE(kid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3233,6 +3233,7 @@ nsGenericHTMLContainerElement::~nsGenericHTMLContainerElement()
|
|||
PRInt32 n = mChildren.Count();
|
||||
for (PRInt32 i = 0; i < n; i++) {
|
||||
nsIContent* kid = (nsIContent *)mChildren.ElementAt(i);
|
||||
kid->SetParent(nsnull);
|
||||
NS_RELEASE(kid);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче