Backed out changeset 8f5b359fc9fc (bug 1141894) for m-oth failures CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 24 Mar 2015 17:18:10 -0700
changeset 264318 ad9f2c49d807c15b292689e4c9b82f9ae4b65c88
parent 264317 9dce1a90205efc057259abc390c0fa218d9bee0e
child 264319 f0a4844f0ccdcb5cb610a5fbce9e071fa9f9ee9b
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1141894
milestone39.0a1
backs out8f5b359fc9fcacb564a043e5dcef5ffb88a379d7
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 8f5b359fc9fc (bug 1141894) for m-oth failures CLOSED TREE
image/src/imgLoader.cpp
--- a/image/src/imgLoader.cpp
+++ b/image/src/imgLoader.cpp
@@ -1617,37 +1617,16 @@ bool imgLoader::ValidateRequestWithNewCh
       return false;
     }
 
     req.forget(aProxyRequest);
     return true;
   }
 }
 
-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,
                                 nsIURI *aReferrerURI,
                                 ReferrerPolicy aReferrerPolicy,
                                 nsILoadGroup *aLoadGroup,
                                 imgINotificationObserver *aObserver,
                                 nsISupports *aCX,
@@ -1757,31 +1736,25 @@ bool imgLoader::ValidateEntry(imgCacheEn
   if (requestAppCache != groupAppCache) {
     PR_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("imgLoader::ValidateEntry - Unable to use cached imgRequest "
             "[request=%p] because of mismatched application caches\n",
             address_of(request)));
     return false;
   }
 
-  if (validateRequest) {
-    if (!IsURICacheable(aURI, request)) {
-      return false;
-    }
-
-    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);
-    }
+  if (validateRequest && 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 !validateRequest;
 }
 
 bool imgLoader::RemoveFromCache(nsIURI *aKey)
 {
   MOZ_ASSERT(NS_IsMainThread(), "Cannot use nsIURI off main thread!");