mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811394. Prevent recursion into nsXULWindow::Destroy. r=smaug
This commit is contained in:
parent
eaf74f362b
commit
fecdb58ed6
@ -95,6 +95,7 @@ nsXULWindow::nsXULWindow(uint32_t aChromeFlags)
|
||||
mIgnoreXULPosition(false),
|
||||
mChromeFlagsFrozen(false),
|
||||
mIgnoreXULSizeMode(false),
|
||||
mDestroying(false),
|
||||
mContextFlags(0),
|
||||
mPersistentAttributesDirty(0),
|
||||
mPersistentAttributesMask(0),
|
||||
@ -409,6 +410,13 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
||||
if (!mWindow)
|
||||
return NS_OK;
|
||||
|
||||
// Ensure we don't reenter this code
|
||||
if (mDestroying)
|
||||
return NS_OK;
|
||||
|
||||
mozilla::AutoRestore<bool> guard(mDestroying);
|
||||
mDestroying = true;
|
||||
|
||||
nsCOMPtr<nsIAppShellService> appShell(do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
|
||||
NS_ASSERTION(appShell, "Couldn't get appShell... xpcom shutdown?");
|
||||
if (appShell)
|
||||
|
@ -138,6 +138,9 @@ protected:
|
||||
bool mIgnoreXULPosition;
|
||||
bool mChromeFlagsFrozen;
|
||||
bool mIgnoreXULSizeMode;
|
||||
// mDestroying is used to prevent reentry into into Destroy(), which can
|
||||
// otherwise happen due to script running as we tear down various things.
|
||||
bool mDestroying;
|
||||
uint32_t mContextFlags;
|
||||
uint32_t mPersistentAttributesDirty; // persistentAttributes
|
||||
uint32_t mPersistentAttributesMask;
|
||||
|
Loading…
Reference in New Issue
Block a user