Fix for 80996, prevent attempted access to freed event listeners by throwing out old ELM when loading new page. sr:jst, r:nisheeth

This commit is contained in:
joki%netscape.com 2001-05-23 06:33:28 +00:00
parent 80d36b42b2
commit 300c54251d

View File

@ -374,8 +374,10 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
mSidebar = nsnull;
}
if (mListenerManager)
if (mListenerManager) {
mListenerManager->RemoveAllListeners(PR_FALSE);
mListenerManager = nsnull;
}
if (mContext && mJSObject) {
// if (mContext && mJSObject && aDocument) {