mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Fix leak from complicated ownership cycle by releasing |mChromeEventHandler| in |CleanUp| and |SetDocShell|. b=87466 r=saari sr=hyatt
This commit is contained in:
parent
a1785baacf
commit
1496d5b7f1
@ -208,6 +208,7 @@ void GlobalWindowImpl::CleanUp()
|
||||
mOpener = nsnull; // Forces Release
|
||||
mControllers = nsnull; // Forces Release
|
||||
mContext = nsnull; // Forces Release
|
||||
mChromeEventHandler = nsnull; // Forces Release
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -438,6 +439,7 @@ NS_IMETHODIMP GlobalWindowImpl::SetDocShell(nsIDocShell* aDocShell)
|
||||
|
||||
mContext = nsnull; // force release now
|
||||
mControllers = nsnull; // force release now
|
||||
mChromeEventHandler = nsnull; // force release now
|
||||
}
|
||||
mDocShell = aDocShell; // Weak Reference
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user