diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index f4eb951100c..d1bedddd1b6 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -1914,10 +1914,7 @@ nsHTMLDocument::OpenCommon(nsIURI* aSourceURL) mScriptGlobalObject->GetDocShell(getter_AddRefs(docshell)); if (docshell) { - nsCOMPtr wn(do_QueryInterface(docshell)); - if(wn) { - wn->Stop(); - } + docshell->StopLoad(); } } diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 17d7343a0a9..b4edeea3a40 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -318,6 +318,9 @@ NS_IMETHODIMP nsDocShell::CreateLoadInfo(nsIDocShellLoadInfo** aLoadInfo) NS_IMETHODIMP nsDocShell::StopLoad() { + // Cancel any timers that were set for this loader. + CancelRefreshURITimers(); + if(mLoadCookie) { nsCOMPtr uriLoader = do_GetService(NS_URI_LOADER_PROGID); diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index f4eb951100c..d1bedddd1b6 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -1914,10 +1914,7 @@ nsHTMLDocument::OpenCommon(nsIURI* aSourceURL) mScriptGlobalObject->GetDocShell(getter_AddRefs(docshell)); if (docshell) { - nsCOMPtr wn(do_QueryInterface(docshell)); - if(wn) { - wn->Stop(); - } + docshell->StopLoad(); } }