Back out changesets 6a2c57fa8edf, 34526f45d863 (bug 737307) due to web-facing regressions (e.g. bug 739478). r=bz

--HG--
extra : rebase_source : 4b595ee4ef7ab60a1d831bf50f1c973161e3187c
This commit is contained in:
Justin Lebar 2012-03-26 17:10:07 -07:00
parent 905c0f1adb
commit 02941cac89
3 changed files with 1 additions and 54 deletions

View File

@ -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<nsIURI> 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<nsIChannel> docChannel = GetCurrentDocChannel();
if (!docChannel || !mLoadGroup) {
return;
}
nsCOMPtr<nsISimpleEnumerator> requests;
mLoadGroup->GetRequests(getter_AddRefs(requests));
if (!requests) {
return;
}
while (true) {
bool hasMoreElements = false;
requests->HasMoreElements(&hasMoreElements);
if (!hasMoreElements) {
break;
}
nsCOMPtr<nsISupports> next;
requests->GetNext(getter_AddRefs(next));
nsCOMPtr<nsIChannel> 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)
{

View File

@ -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);

View File

@ -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) {