the reopened bug 18553 - clear event handlers when first
document is loaded in a window. r=heikki, sr=vidur git-svn-id: svn://10.0.0.236/trunk@104278 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
166957e3a3
commit
89fbff2047
@ -376,6 +376,11 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
|
||||
doc = nsnull; // Forces release now
|
||||
}
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->RemoveAllListeners(PR_FALSE);
|
||||
mListenerManager = nsnull;
|
||||
}
|
||||
|
||||
if (docURL) {
|
||||
nsXPIDLCString url;
|
||||
|
||||
@ -390,11 +395,6 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
|
||||
mSidebar = nsnull;
|
||||
}
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->RemoveAllListeners(PR_FALSE);
|
||||
mListenerManager = nsnull;
|
||||
}
|
||||
|
||||
if (mContext && mJSObject) {
|
||||
// if (mContext && mJSObject && aDocument) {
|
||||
// not doing this unless there's a new document prevents a closed window's
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user