зеркало из https://github.com/mozilla/gecko-dev.git
Added code to delete nsBrowserWindow object
This commit is contained in:
Родитель
1b8db3dd60
Коммит
acdd8de5e3
|
@ -203,6 +203,7 @@ HandleBrowserEvent(nsGUIEvent *aEvent)
|
|||
|
||||
case NS_DESTROY:
|
||||
bw->Destroy();
|
||||
NS_RELEASE(bw);
|
||||
return nsEventStatus_eConsumeDoDefault;
|
||||
|
||||
case NS_MENU_SELECTED:
|
||||
|
@ -471,7 +472,6 @@ nsBrowserWindow::nsBrowserWindow()
|
|||
|
||||
nsBrowserWindow::~nsBrowserWindow()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsBrowserWindow)
|
||||
|
|
|
@ -350,6 +350,9 @@ NS_IMETHODIMP
|
|||
nsViewerApp::OpenWindow()
|
||||
{
|
||||
// Create browser window
|
||||
// XXX Some piece of code needs to properly hold the reference to this
|
||||
// browser window. For the time being the reference is released by the
|
||||
// browser event handling code during processing of the NS_DESTROY event...
|
||||
nsBrowserWindow* bw = nsnull;
|
||||
nsresult rv = NSRepository::CreateInstance(kBrowserWindowCID, nsnull,
|
||||
kIBrowserWindowIID,
|
||||
|
|
Загрузка…
Ссылка в новой задаче