diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 831af1559df..858e5d0e571 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -2335,7 +2335,8 @@ nsWebShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIDocumentViewer* docViewer; nsresult rv = NS_ERROR_FAILURE; - if (nsnull != mScriptGlobal) { + if ((nsnull != mScriptGlobal) && + (loader == mDocLoader)) { if (nsnull != mContentViewer && NS_OK == mContentViewer->QueryInterface(kIDocumentViewerIID, (void**)&docViewer)) { nsIPresContext *presContext; diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 831af1559df..858e5d0e571 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -2335,7 +2335,8 @@ nsWebShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIDocumentViewer* docViewer; nsresult rv = NS_ERROR_FAILURE; - if (nsnull != mScriptGlobal) { + if ((nsnull != mScriptGlobal) && + (loader == mDocLoader)) { if (nsnull != mContentViewer && NS_OK == mContentViewer->QueryInterface(kIDocumentViewerIID, (void**)&docViewer)) { nsIPresContext *presContext;