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
Родитель 135d43201f
Коммит b1784ff670
1 изменённых файлов: 0 добавлений и 14 удалений

Просмотреть файл

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