Bug #21358 --> Make sure we only call the on load handler ONCE per document. This prevents a nasty loop if

the onload handler tries to load an ftp url.
r=travis
a=jar
This commit is contained in:
mscott@netscape.com
2000-03-07 06:02:04 +00:00
parent cdcad97d62
commit 441365df4f
4 changed files with 14 additions and 4 deletions

View File

@@ -2667,7 +2667,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
if (loader == mDocLoader) {
mProcessedEndDocumentLoad = PR_TRUE;
if (mScriptGlobal) {
if (mScriptGlobal && !mEODForCurrentDocument) {
nsIDocumentViewer* docViewer;
if (nsnull != mContentViewer &&
NS_OK == mContentViewer->QueryInterface(kIDocumentViewerIID, (void**)&docViewer)) {
@@ -2685,6 +2685,8 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
}
}
mEODForCurrentDocument = PR_TRUE;
// Fire the EndLoadURL of the web shell container
if (nsnull != aURL) {
nsAutoString urlString;