Added and used Close() method to nsWebShellWindow. Part of fix for bug 3676 (again) and 3900. Wants to be part of M3 build. r:sdagley,pierre. a:chofmann,cyeh.

git-svn-id: svn://10.0.0.236/trunk@24305 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
1999-03-18 19:08:36 +00:00
parent 6c0a68e81f
commit 61eba8993a
3 changed files with 32 additions and 6 deletions

View File

@@ -275,6 +275,24 @@ nsresult nsWebShellWindow::Initialize(nsIWidget* aParent,
}
/*
* Close the window
*/
NS_METHOD
nsWebShellWindow::Close()
{
NS_IF_RELEASE(mWindow);
NS_IF_RELEASE(mWebShell);
/* note: this next Release() seems like the right thing to do, but it doesn't
appear exactly necessary, and we are afraid of possible repercussions
unexplored at this time. ("this time" being a stability release crunch.)
Revisit this later!?
*/
// Release();
return NS_OK;
}
/*
* Event handler function...
*
@@ -321,7 +339,6 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
(nsISupports**)&appShell);
if (NS_SUCCEEDED(rv)) {
appShell->CloseTopLevelWindow(aEvent->widget);
nsServiceManager::ReleaseService(kAppShellServiceCID, appShell);
}
break;