Bug 1329506 - Add missing non-null check in mozilla::net::DoUpdateExpirationTime. r=michal a=jcristau
authorHonza Bambas <honzab.moz@firemni.cz>
Tue, 17 Jan 2017 07:36:00 -0500
changeset 375757 faae0d26b4dffa56626ac6964b7697ce09684a74
parent 375756 cc00a0e9025fb83a7f2265e02a3e1ad6c3b5c4c8
child 375758 10606a7696400f990722e323c1d9bfc35e6d612d
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal, jcristau
bugs1329506
milestone53.0a2
Bug 1329506 - Add missing non-null check in mozilla::net::DoUpdateExpirationTime. r=michal a=jcristau
netwerk/cache2/CacheEntry.cpp
--- a/netwerk/cache2/CacheEntry.cpp
+++ b/netwerk/cache2/CacheEntry.cpp
@@ -1474,17 +1474,17 @@ NS_IMETHODIMP CacheEntry::Recreate(bool 
 
   RefPtr<CacheEntryHandle> handle = ReopenTruncated(aMemoryOnly, nullptr);
   if (handle) {
     handle.forget(_retval);
     return NS_OK;
   }
 
   BackgroundOp(Ops::CALLBACKS, true);
-  return NS_OK;
+  return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP CacheEntry::GetDataSize(int64_t *aDataSize)
 {
   LOG(("CacheEntry::GetDataSize [this=%p]", this));
   *aDataSize = 0;
 
   {