mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
bug 306164: The global scope polluter is not reinstalled when document.write is used. r+sr=jst
This commit is contained in:
parent
f3ce4771c5
commit
17f1097d7e
@ -947,7 +947,9 @@ nsGlobalWindow::SetNewDocument(nsIDOMDocument* aDocument,
|
||||
currentInner->mListenerManager = nsnull;
|
||||
}
|
||||
|
||||
nsWindowSH::InvalidateGlobalScopePolluter(cx, currentInner->mJSObject);
|
||||
if (!reUseInnerWindow || newDoc != oldDoc) {
|
||||
nsWindowSH::InvalidateGlobalScopePolluter(cx, currentInner->mJSObject);
|
||||
}
|
||||
}
|
||||
|
||||
nsRefPtr<nsGlobalWindow> newInnerWindow;
|
||||
@ -1097,7 +1099,7 @@ nsGlobalWindow::SetNewDocument(nsIDOMDocument* aDocument,
|
||||
mInnerWindow = newInnerWindow;
|
||||
}
|
||||
|
||||
if (newDoc != oldDoc && !aState) {
|
||||
if ((!reUseInnerWindow || newDoc != oldDoc) && !aState) {
|
||||
nsCOMPtr<nsIHTMLDocument> html_doc(do_QueryInterface(mDocument));
|
||||
nsWindowSH::InstallGlobalScopePolluter(cx, newInnerWindow->mJSObject,
|
||||
html_doc);
|
||||
|
Loading…
Reference in New Issue
Block a user