зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e0b853e58c
Коммит
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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче