mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
hide while destroying. prevents bad messages from getting to partially dead window. bug 28241
This commit is contained in:
parent
9059c3a2c7
commit
9fe3a0a9db
@ -326,7 +326,12 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
||||
|
||||
nsCOMPtr<nsIXULWindow> placeHolder = this;
|
||||
|
||||
// Remove modality (if any) and hide while destroying. More than
|
||||
// a convenience, the hide prevents user interaction with the partially
|
||||
// destroyed window. This is especially necessary when the eldest window
|
||||
// in a stack of modal windows is destroyed first. It happens.
|
||||
ExitModalLoop();
|
||||
mWindow->Show(PR_FALSE);
|
||||
|
||||
if(mDocShell)
|
||||
{
|
||||
@ -722,6 +727,11 @@ NS_IMETHODIMP nsXULWindow::LoadTitleFromXUL()
|
||||
|
||||
NS_IMETHODIMP nsXULWindow::PersistPositionAndSize(PRBool aPosition, PRBool aSize)
|
||||
{
|
||||
// can happen when the persistence timer fires at an inopportune time
|
||||
// during window shutdown
|
||||
if (!mDocShell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> docShellElement;
|
||||
GetDOMElementFromDocShell(mDocShell, getter_AddRefs(docShellElement));
|
||||
if(!docShellElement)
|
||||
|
Loading…
x
Reference in New Issue
Block a user