Bug 1222633 - nsPrefetchService should not cancel rel=preload if the load ends. r=smaug

This commit is contained in:
Dragana Damjanovic dd.mozilla@gmail.com 2017-07-10 15:05:41 +02:00
parent 135d43201f
commit b1784ff670

View File

@ -602,12 +602,6 @@ nsPrefetchService::StartPrefetching()
// until after all sub-frames have finished loading.
if (!mStopCount) {
mHaveProcessed = true;
// mAggressive mode is used only for testing. If we are in the
// aggressive mode, we will not stop preloads even if page load
// stops.
if (!mAggressive) {
StopCurrentPrefetchsPreloads(true);
}
while (!mPrefetchQueue.empty() &&
mCurrentNodes.Length() < static_cast<uint32_t>(mMaxParallelism)) {
ProcessNextPrefetchURI();
@ -721,14 +715,6 @@ nsPrefetchService::Preload(nsIURI *aURI,
return NS_ERROR_ABORT;
}
// mAggressive mode is used for tests only, it make writing tests easier.
// In this mode preloads will be fetched even if the page load trigering
// them ends.
if ((!mStopCount && mHaveProcessed) && !mAggressive) {
LOG(("rejected: there is not load active!"));
return NS_ERROR_ABORT;
}
nsresult rv = CheckURIScheme(aURI, aReferrerURI);
if (NS_FAILED(rv)) {
return rv;