diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index ed3cc52b7d6..ffa902687bf 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8348,13 +8348,6 @@ nsDocShell::InternalLoad(nsIURI * aURI, sameExceptHashes && !newHash.IsEmpty()); if (doShortCircuitedLoad) { - // If our load group contains a LOAD_DOCUMENT_URI request with a - // channel which doesn't match our document's channel, cancel it. - // - // That is, a short-circuited load will cancel a non-short-circuited - // load of a different document. - StopOutstandingOtherDocumentLoad(); - // Save the current URI; we need it if we fire a hashchange later. nsCOMPtr oldURI = mCurrentURI; @@ -8654,47 +8647,6 @@ nsDocShell::InternalLoad(nsIURI * aURI, return rv; } -// If our load group contains a LOAD_DOCUMENT_URI channel that's not our -// document's channel, cancel it. -void -nsDocShell::StopOutstandingOtherDocumentLoad() -{ - nsCOMPtr docChannel = GetCurrentDocChannel(); - if (!docChannel || !mLoadGroup) { - return; - } - - nsCOMPtr requests; - mLoadGroup->GetRequests(getter_AddRefs(requests)); - if (!requests) { - return; - } - - while (true) { - bool hasMoreElements = false; - requests->HasMoreElements(&hasMoreElements); - if (!hasMoreElements) { - break; - } - - nsCOMPtr next; - requests->GetNext(getter_AddRefs(next)); - - nsCOMPtr channel = do_QueryInterface(next); - if (!channel) { - continue; - } - - nsLoadFlags flags; - channel->GetLoadFlags(&flags); - - // As promised, cancel the channel if it's loading a different document. - if ((flags & nsIChannel::LOAD_DOCUMENT_URI) && channel != docChannel) { - channel->Cancel(NS_BINDING_ABORTED); - } - } -} - nsIPrincipal* nsDocShell::GetInheritedPrincipal(bool aConsiderCurrentDocument) { diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 9b9b2b81077..29fa6d0d416 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -672,11 +672,6 @@ protected: nsresult EnsureCommandHandler(); nsIChannel* GetCurrentDocChannel(); - - // If our load group contains a LOAD_DOCUMENT_URI channel that's not our - // document's channel, cancel it. - void StopOutstandingOtherDocumentLoad(); - protected: // Override the parent setter from nsDocLoader virtual nsresult SetDocLoaderParent(nsDocLoader * aLoader); diff --git a/dom/tests/mochitest/ajax/lib/AJAX_setup.js b/dom/tests/mochitest/ajax/lib/AJAX_setup.js index d56c5ad99d5..d90e14227b8 100644 --- a/dom/tests/mochitest/ajax/lib/AJAX_setup.js +++ b/dom/tests/mochitest/ajax/lib/AJAX_setup.js @@ -8,7 +8,7 @@ function runAJAXTest() { var test = AJAXtests.shift(); var testframe = document.getElementById("testframe"); - setTimeout(function() { testframe.src = test; }, 0); + testframe.src = test; } function onManifestLoad(manifest) {