mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Bug #16115 --> addref the web shell window inside it's Close method to keep the web shell window from getting
deleted out from under us. This could happen because in closing the window, we are destroying a webshell which could have the last outstanding reference to the webshell window. r=dp
This commit is contained in:
parent
e0b853e58c
commit
ee28759d13
@ -433,6 +433,13 @@ nsresult nsWebShellWindow::Initialize(nsIWebShellWindow* aParent,
|
||||
NS_METHOD
|
||||
nsWebShellWindow::Close()
|
||||
{
|
||||
// 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 webshell
|
||||
// we close ends up being the last owning reference to this webshell
|
||||
// window.
|
||||
|
||||
nsCOMPtr<nsIWebShellWindow> placeHolder = this;
|
||||
|
||||
ExitModalLoop();
|
||||
if (mWebShell) {
|
||||
mWebShell->Destroy();
|
||||
|
Loading…
Reference in New Issue
Block a user