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 git-svn-id: svn://10.0.0.236/trunk@50544 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user