Remove browser instance from progress listener list when it is closed

b=45817,r=valeski,a=valeski
This commit is contained in:
locka%iol.ie 2000-07-26 22:35:14 +00:00
Родитель 8e978de4af
Коммит 8cc317c248
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -1297,6 +1297,14 @@ nsBrowserInstance::Close()
else
mIsClosed = PR_TRUE;
// Remove listeners we may have registered
nsIDocShell* docShell = GetContentAreaDocShell();
if (docShell)
{
nsCOMPtr<nsIWebProgress> webProgress(do_GetInterface(docShell));
webProgress->RemoveProgressListener(NS_STATIC_CAST(nsIWebProgressListener*, this));
}
// Undo other stuff we did in SetContentWindow.
if ( GetContentAreaDocShell() ) {
GetContentAreaDocShell()->SetDocLoaderObserver( 0 );