зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1222633 - nsPrefetchService should not cancel rel=preload if the load ends. r=smaug
This commit is contained in:
Родитель
135d43201f
Коммит
b1784ff670
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче