mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1238707 Release the window immediately in TabParent::Destroy() to avoid leaks. r=smaug
This commit is contained in:
parent
d7dfb00a02
commit
21fd4f4b0b
@ -5430,7 +5430,7 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
|
||||
// Opening new tabs is the easy case...
|
||||
if (openLocation == nsIBrowserDOMWindow::OPEN_NEWTAB) {
|
||||
if (NS_WARN_IF(!browserDOMWin)) {
|
||||
*aResult = NS_ERROR_FAILURE;
|
||||
*aResult = NS_ERROR_ABORT;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -606,6 +606,10 @@ TabParent::DestroyInternal()
|
||||
void
|
||||
TabParent::Destroy()
|
||||
{
|
||||
// Aggressively release the window to avoid leaking the world in shutdown
|
||||
// corner cases.
|
||||
mBrowserDOMWindow = nullptr;
|
||||
|
||||
if (mIsDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user