Bug 448548, r+sr=sicking

This commit is contained in:
Olli Pettay 2008-08-24 18:00:49 +03:00
parent 70a550fd3e
commit 20c5c91fe4
3 changed files with 15 additions and 0 deletions

View File

@ -3025,6 +3025,7 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
mScriptGlobalObject = aScriptGlobalObject;
if (aScriptGlobalObject) {
mScriptObject = nsnull;
mHasHadScriptHandlingObject = PR_TRUE;
// Go back to using the docshell for the layout history state
mLayoutHistoryState = nsnull;

View File

@ -169,6 +169,13 @@ txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
// Create the document
rv = NS_NewXMLDocument(getter_AddRefs(mDocument));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> source = do_QueryInterface(aSourceDocument);
NS_ENSURE_STATE(source);
PRBool hasHadScriptObject = PR_FALSE;
nsIScriptGlobalObject* sgo =
source->GetScriptHandlingObject(hasHadScriptObject);
NS_ENSURE_STATE(sgo || !hasHadScriptObject);
mDocument->SetScriptHandlingObject(sgo);
}
else {
mDocument = do_QueryInterface(aResultDocument);

View File

@ -833,6 +833,13 @@ txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, PRInt32 aNsID
rv = NS_NewXMLDocument(getter_AddRefs(mDocument));
NS_ENSURE_SUCCESS(rv, rv);
}
nsCOMPtr<nsIDocument> source = do_QueryInterface(aSourceDocument);
NS_ENSURE_STATE(source);
PRBool hasHadScriptObject = PR_FALSE;
nsIScriptGlobalObject* sgo =
source->GetScriptHandlingObject(hasHadScriptObject);
NS_ENSURE_STATE(sgo || !hasHadScriptObject);
mDocument->SetScriptHandlingObject(sgo);
}
else {
mDocument = do_QueryInterface(aResultDocument);