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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user