зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
216a76811d
Коммит
ce31b4b9d0
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче