Bug 1197215 - Remove now unnecessary uses of ok in the predictor. r=hurley
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 21 Aug 2015 20:38:58 +0200
changeset 293186 4c14cdd926f9969fa875dd2d9d9d69274615fc64
parent 293185 581329d6602b9dc55cb16f0c089557e981214ed5
child 293187 28f4e829b1e6b69259c1162b930a4768df9d937b
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1197215
milestone43.0a1
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
Bug 1197215 - Remove now unnecessary uses of ok in the predictor. r=hurley
netwerk/base/Predictor.cpp
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -1510,29 +1510,29 @@ Predictor::SpaceCleaner::OnMetaDataEleme
     nsKey.AssignASCII(key);
     mLongKeysToDelete.AppendElement(nsKey);
     return NS_OK;
   }
 
   nsCString uri;
   nsresult rv = parsedURI->GetAsciiSpec(uri);
   uint32_t uriLength = uri.Length();
-  if (ok && NS_SUCCEEDED(rv) &&
+  if (NS_SUCCEEDED(rv) &&
       uriLength > mPredictor->mMaxURILength) {
     // Default to getting rid of URIs that are too long and were put in before
     // we had our limit on URI length, in order to free up some space.
     nsCString nsKey;
     nsKey.AssignASCII(key);
     mLongKeysToDelete.AppendElement(nsKey);
     return NS_OK;
   }
 
-  if (!ok || !mLRUKeyToDelete || lastHit < mLRUStamp) {
+  if (!mLRUKeyToDelete || lastHit < mLRUStamp) {
     mLRUKeyToDelete = key;
-    mLRUStamp = ok ? lastHit : 0;
+    mLRUStamp = lastHit;
   }
 
   return NS_OK;
 }
 
 void
 Predictor::SpaceCleaner::Finalize(nsICacheEntry *entry)
 {