зеркало из https://github.com/mozilla/pjs.git
The XULWindow object can get destroyed during the closing of a window, thus our loop would not have access to the mContinueLoop. We internally bump the ref on ourselves to ensure that while in the loop the object stays valid. r=mscott.
This commit is contained in:
Родитель
1b2e88bca7
Коммит
799800b4dd
|
@ -767,9 +767,10 @@ NS_IMETHODIMP nsXULWindow::ShowModal()
|
|||
|
||||
appShell->Create(0, nsnull);
|
||||
appShell->Spinup();
|
||||
|
||||
nsCOMPtr<nsIWidget> window = mWindow; // Store locally so it doesn't die on
|
||||
// us
|
||||
// Store locally so it doesn't die on us
|
||||
nsCOMPtr<nsIWidget> window = mWindow;
|
||||
nsCOMPtr<nsIXULWindow> tempRef = this;
|
||||
|
||||
|
||||
window->SetModal(PR_TRUE);
|
||||
mContinueModalLoop = PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче