Backed out changeset 8f5b359fc9fc (bug 1141894) for m-oth failures CLOSED TREE

--HG--
extra : amend_source : 8b3a4d36927acc91cce7450e7888aebb24f8cb06
This commit is contained in:
Wes Kocher 2015-03-24 17:18:10 -07:00
Родитель a5b86b8750
Коммит 8ef8d2c097
1 изменённых файлов: 8 добавлений и 35 удалений

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

@ -1622,27 +1622,6 @@ bool imgLoader::ValidateRequestWithNewChannel(imgRequest *request,
}
}
static bool
IsURICacheable(nsIURI* aURI, imgRequest* aRequest)
{
bool isHttp = false;
bool isHttps = false;
bool isViewSource = false;
if (NS_FAILED(aURI->SchemeIs("http", &isHttp)) ||
NS_FAILED(aURI->SchemeIs("https", &isHttps)) ||
NS_FAILED(aURI->SchemeIs("view-source", &isViewSource)) ||
!(isHttp || isHttps || isViewSource)) {
PR_LOG(GetImgLog(), PR_LOG_DEBUG,
("imgLoader::IsURICacheable - Can't use cached imgRequest "
"[request=%p] because we need to validate but the scheme "
"indicates a non-cacheable channel type\n", aRequest));
return false;
}
return true;
}
bool imgLoader::ValidateEntry(imgCacheEntry *aEntry,
nsIURI *aURI,
nsIURI *aInitialDocumentURI,
@ -1762,21 +1741,15 @@ bool imgLoader::ValidateEntry(imgCacheEntry *aEntry,
return false;
}
if (validateRequest) {
if (!IsURICacheable(aURI, request)) {
return false;
}
if (validateRequest && aCanMakeNewChannel) {
LOG_SCOPE(GetImgLog(), "imgLoader::ValidateRequest |cache hit| must validate");
if (aCanMakeNewChannel) {
LOG_SCOPE(GetImgLog(), "imgLoader::ValidateRequest |cache hit| must validate");
return ValidateRequestWithNewChannel(request, aURI, aInitialDocumentURI,
aReferrerURI, aReferrerPolicy,
aLoadGroup, aObserver,
aCX, aLoadFlags, aLoadPolicyType,
aProxyRequest, aLoadingPrincipal,
aCORSMode);
}
return ValidateRequestWithNewChannel(request, aURI, aInitialDocumentURI,
aReferrerURI, aReferrerPolicy,
aLoadGroup, aObserver,
aCX, aLoadFlags, aLoadPolicyType,
aProxyRequest, aLoadingPrincipal,
aCORSMode);
}
return !validateRequest;