mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
Added release of content object in SetDocumentInChildrenOf. This fixes a
memory leak
This commit is contained in:
parent
54b32fe09a
commit
b6d7f0aa2f
@ -1125,6 +1125,7 @@ SetDocumentInChildrenOf(nsIContent* aContent, nsIDocument* aDocument)
|
||||
aContent->ChildAt(i, child);
|
||||
if (nsnull != child) {
|
||||
child->SetDocument(aDocument, PR_TRUE);
|
||||
NS_RELEASE(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1125,6 +1125,7 @@ SetDocumentInChildrenOf(nsIContent* aContent, nsIDocument* aDocument)
|
||||
aContent->ChildAt(i, child);
|
||||
if (nsnull != child) {
|
||||
child->SetDocument(aDocument, PR_TRUE);
|
||||
NS_RELEASE(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2265,6 +2265,7 @@ SetDocumentInChildrenOf(nsIContent* aContent, nsIDocument* aDocument)
|
||||
if (nsnull != child) {
|
||||
child->SetDocument(aDocument);
|
||||
SetDocumentInChildrenOf(child, aDocument);
|
||||
NS_RELEASE(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user