Fixed the order in which the main docShell is released against when the content shells are released. The content shells are held onto until after the main docShell is released so the content shells can still be grabbed.

This commit is contained in:
tbogard%aol.net 2000-01-29 11:08:21 +00:00
Родитель 216a76811d
Коммит ce31b4b9d0
1 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -238,6 +238,13 @@ NS_IMETHODIMP nsXULWindow::Create()
NS_IMETHODIMP nsXULWindow::Destroy()
{
if(mDocShell)
{
nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
shellAsWin->Destroy();
mDocShell = nsnull;
}
// Remove our ref on the content shells
PRInt32 count;
count = mContentShells.Count();
@ -248,12 +255,6 @@ NS_IMETHODIMP nsXULWindow::Destroy()
}
mContentShells.Clear();
if(mDocShell)
{
nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
shellAsWin->Destroy();
mDocShell = nsnull;
}
if(mContentTreeOwner)
{
mContentTreeOwner->XULWindow(nsnull);