Bug 881804 (part 3) - Plumb script loader into predictive network actions. r=jst

This commit is contained in:
Nicholas Hurley 2013-10-25 14:56:54 -07:00
parent 8561183e0d
commit bcf8e851a3

View File

@ -47,6 +47,7 @@
#include "nsCrossSiteListenerProxy.h"
#include "nsSandboxFlags.h"
#include "nsContentTypeParser.h"
#include "nsINetworkSeer.h"
#include "mozilla/CORSMode.h"
#include "mozilla/Attributes.h"
@ -329,6 +330,10 @@ nsScriptLoader::StartLoad(nsScriptLoadRequest *aRequest, const nsAString &aType,
httpChannel->SetReferrer(mDocument->GetDocumentURI());
}
nsCOMPtr<nsILoadContext> loadContext(do_QueryInterface(docshell));
mozilla::net::SeerLearn(aRequest->mURI, mDocument->GetDocumentURI(),
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE, loadContext);
nsCOMPtr<nsIStreamLoader> loader;
rv = NS_NewStreamLoader(getter_AddRefs(loader), this);
NS_ENSURE_SUCCESS(rv, rv);