зеркало из https://github.com/mozilla/pjs.git
Hold a strong ref to the node we plan to remove, since we want to use it after
removing it from the tree. Bug 221494, r+sr=jst
This commit is contained in:
Родитель
f2b2ff4594
Коммит
71b6cca92b
|
@ -1422,7 +1422,7 @@ nsXULContentBuilder::RemoveGeneratedContent(nsIContent* aElement)
|
|||
PRUint32 i = element->GetChildCount();
|
||||
|
||||
while (i-- > 0) {
|
||||
nsIContent *child = element->GetChildAt(i);
|
||||
nsCOMPtr<nsIContent> child = element->GetChildAt(i);
|
||||
|
||||
// Optimize for the <template> element, because we *know*
|
||||
// it won't have any generated content: there's no reason
|
||||
|
@ -1446,7 +1446,6 @@ nsXULContentBuilder::RemoveGeneratedContent(nsIContent* aElement)
|
|||
|
||||
// If we get here, it's "generated". Bye bye!
|
||||
element->RemoveChildAt(i, PR_TRUE);
|
||||
child->SetDocument(nsnull, PR_TRUE, PR_TRUE);
|
||||
|
||||
// Remove element from the conflict set.
|
||||
// XXXwaterson should this be moved into NoteGeneratedSubtreeRemoved?
|
||||
|
|
Загрузка…
Ссылка в новой задаче