mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
[XPFE] Properly anchor XUL windows when tearing down
This commit is contained in:
parent
9ec0ef7614
commit
36f366b0ed
1 changed files with 2 additions and 10 deletions
|
|
@ -455,6 +455,8 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
|||
if (mDestroying)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIXULWindow> kungFuDeathGrip(this);
|
||||
|
||||
mozilla::AutoRestore<bool> guard(mDestroying);
|
||||
mDestroying = true;
|
||||
|
||||
|
|
@ -467,16 +469,6 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
|||
if (parentWindow)
|
||||
parentWindow->RemoveChildWindow(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
|
||||
|
||||
// XXXTAB This shouldn't be an issue anymore because the ownership model
|
||||
// only goes in one direction. When webshell container is fully removed
|
||||
// try removing this...
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue