Bug 980527 - wrong log at CacheEntry::ReopenTruncated, r=michal
authorHonza Bambas <honzab.moz@firemni.cz>
Mon, 17 Mar 2014 18:21:39 +0100
changeset 173953 c9f1ddebc4041bd50da8f0f1f4766d6394d4a0f8
parent 173952 042679e999a7baeb24c03ed4d9760ef7fccf4c74
child 173954 ce6a8fa5db7d76a0e0268096128f473f78a53917
push id26438
push userphilringnalda@gmail.com
push dateTue, 18 Mar 2014 05:39:07 +0000
treeherderautoland@89275f0ae29f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal
bugs980527
milestone30.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 980527 - wrong log at CacheEntry::ReopenTruncated, r=michal
netwerk/cache2/CacheEntry.cpp
--- a/netwerk/cache2/CacheEntry.cpp
+++ b/netwerk/cache2/CacheEntry.cpp
@@ -415,23 +415,22 @@ already_AddRefed<CacheEntryHandle> Cache
     // The following call dooms this entry (calls DoomAlreadyRemoved on us)
     nsresult rv = CacheStorageService::Self()->AddStorageEntry(
       GetStorageID(), GetURI(), GetEnhanceID(),
       mUseDisk && !aMemoryOnly,
       true, // always create
       true, // truncate existing (this one)
       getter_AddRefs(handle));
 
-    LOG(("  exchanged entry %p by entry %p, rv=0x%08x", this, newEntry.get(), rv));
-
     if (NS_SUCCEEDED(rv)) {
       newEntry = handle->Entry();
+      LOG(("  exchanged entry %p by entry %p, rv=0x%08x", this, newEntry.get(), rv));
       newEntry->AsyncOpen(aCallback, nsICacheStorage::OPEN_TRUNCATE);
-    }
-    else {
+    } else {
+      LOG(("  exchanged of entry %p failed, rv=0x%08x", this, rv));
       AsyncDoom(nullptr);
     }
   }
 
   mPreventCallbacks = false;
 
   if (!newEntry)
     return nullptr;