Bug 1180195 - Uninitialised value use in Predictor::SpaceCleaner::OnMetaDataElement. r=hurley@todesschaf.org.
authorJulian Seward <jseward@acm.org>
Thu, 09 Jul 2015 00:18:54 +0200
changeset 285360 d299c67518bf97f740a7e96b18abeef83394993d
parent 285359 056d1e36d807eb1a4e8063b20557cbbf5d5e5b14
child 285361 89d664f5f70f0ab2be6e6774303431aa65f1aa4a
push id934
push userraliiev@mozilla.com
push dateMon, 26 Oct 2015 12:58:05 +0000
treeherdermozilla-release@05704e35c1d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1180195
milestone42.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 1180195 - Uninitialised value use in Predictor::SpaceCleaner::OnMetaDataElement. r=hurley@todesschaf.org.
netwerk/base/Predictor.cpp
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -1479,17 +1479,17 @@ Predictor::SpaceCleaner::OnMetaDataEleme
   nsCOMPtr<nsIURI> sanityCheck;
   uint32_t hitCount, lastHit, flags;
   bool ok = mPredictor->ParseMetaDataEntry(key, value,
                                            getter_AddRefs(sanityCheck),
                                            hitCount, lastHit, flags);
 
   if (!ok || !mKeyToDelete || lastHit < mLRUStamp) {
     mKeyToDelete = key;
-    mLRUStamp = lastHit;
+    mLRUStamp = ok ? lastHit : 0;
   }
 
   return NS_OK;
 }
 
 void
 Predictor::SpaceCleaner::Finalize(nsICacheEntry *entry)
 {