Bug 1230939 - check the return of sGlobalEntryTables->Get(aContextKey, &diskEntries). r=mayhemer
authorBogdan Postelnicu <bogdan.postelnicu>
Mon, 07 Dec 2015 06:38:00 +0100
changeset 310108 984b095feb49706098b6a9d84e6e57bbb34df4ee
parent 310107 9d2001daa6a23f4a5086947886e724101c7e7270
child 310109 7cec182706ac2b4abf44dd50318a8742b558dc7d
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1230939
milestone45.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 1230939 - check the return of sGlobalEntryTables->Get(aContextKey, &diskEntries). r=mayhemer
netwerk/cache2/CacheStorageService.cpp
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -1741,18 +1741,17 @@ CacheStorageService::DoomStorageEntries(
     // Remove the memory entries table from the global tables.
     // Since we store memory entries also in the disk entries table
     // we need to remove the memory entries from the disk table one
     // by one manually.
     nsAutoPtr<CacheEntryTable> memoryEntries;
     sGlobalEntryTables->RemoveAndForget(memoryStorageID, memoryEntries);
 
     CacheEntryTable* diskEntries;
-    sGlobalEntryTables->Get(aContextKey, &diskEntries);
-    if (memoryEntries && diskEntries) {
+    if (memoryEntries && sGlobalEntryTables->Get(aContextKey, &diskEntries)) {
       for (auto iter = memoryEntries->Iter(); !iter.Done(); iter.Next()) {
         auto entry = iter.Data();
         RemoveExactEntry(diskEntries, iter.Key(), entry, false);
       }
     }
   }
 
   // An artificial callback.  This is a candidate for removal tho.  In the new