mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
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:
parent
80d36b42b2
commit
300c54251d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user