зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1238707 Release the window immediately in TabParent::Destroy() to avoid leaks. r=smaug
This commit is contained in:
Родитель
d7dfb00a02
Коммит
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче