Fix a webshell leak! improper nsCOMPtr useage in DestroyChildren was causing us to leak
all child webshells!!! uhuh...that couldn't have been good git-svn-id: svn://10.0.0.236/trunk@55112 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -744,10 +744,12 @@ nsWebShell::DestroyChildren()
|
||||
{
|
||||
PRInt32 i, n = mChildren.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsCOMPtr<nsIDocShell> shell = (nsIDocShell*) mChildren.ElementAt(i);
|
||||
nsIDocShell * shell = (nsIDocShell*) mChildren.ElementAt(i);
|
||||
shell->SetParent(nsnull);
|
||||
nsCOMPtr<nsIBaseWindow> shellWin(do_QueryInterface(shell));
|
||||
shellWin->Destroy();
|
||||
NS_RELEASE(shell);
|
||||
|
||||
}
|
||||
mChildren.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user