in Destroy(), call appshellservice->Unregister a little earlier. bug 119549 r=ben,hyatt,law
git-svn-id: svn://10.0.0.236/trunk@112767 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0a59ba4156
commit
9037da04af
@ -317,10 +317,19 @@ NS_IMETHODIMP nsXULWindow::Create()
|
||||
|
||||
NS_IMETHODIMP nsXULWindow::Destroy()
|
||||
{
|
||||
mBeingDestroyed = PR_TRUE;
|
||||
if(!mWindow)
|
||||
return NS_OK;
|
||||
|
||||
{
|
||||
/* unregister before setting mBeingDestroyed because -turbo code
|
||||
wants to be able to pose a dialog. */
|
||||
nsCOMPtr<nsIAppShellService> appShell(do_GetService(kAppShellServiceCID));
|
||||
if(appShell)
|
||||
appShell->UnregisterTopLevelWindow(NS_STATIC_CAST(nsIXULWindow*, this));
|
||||
}
|
||||
|
||||
mBeingDestroyed = PR_TRUE;
|
||||
|
||||
nsCOMPtr<nsIXULWindow> parentWindow(do_QueryReferent(mParentWindow));
|
||||
if (parentWindow)
|
||||
parentWindow->RemoveChildWindow(this);
|
||||
@ -348,10 +357,6 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIAppShellService> appShell(do_GetService(kAppShellServiceCID));
|
||||
if(appShell)
|
||||
appShell->UnregisterTopLevelWindow(NS_STATIC_CAST(nsIXULWindow*, this));
|
||||
|
||||
// let's make sure the window doesn't get deleted out from under us
|
||||
// while we are trying to close....this can happen if the docshell
|
||||
// we close ends up being the last owning reference to this xulwindow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user