Bug 1173860 - Null check on sGlobalEntryTables. r=mcmanus, a=lizzard
authorDavid Major <dmajor@mozilla.com>
Wed, 17 Jun 2015 11:23:43 -0400
changeset 267761 4f7839723f0df142abc1d29df254a69c3c17e9e0
parent 267760 7b634b5a66bfefe3b3adbc3d8aa4e13bad8e3455
child 267762 94cba85a74933b22d1866146db0bded91ce42693
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, lizzard
bugs1173860
milestone39.0
Bug 1173860 - Null check on sGlobalEntryTables. r=mcmanus, a=lizzard
netwerk/cache2/CacheStorageService.cpp
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -2086,18 +2086,20 @@ CacheStorageService::CollectReports(nsIM
   // sGlobalEntryTables to N CacheEntryTable
   // CacheEntryTable to N CacheEntry
   // CacheEntry to 1 CacheFile
   // CacheFile to
   //   N CacheFileChunk (keeping the actual data)
   //   1 CacheFileMetadata (keeping http headers etc.)
   //   1 CacheFileOutputStream
   //   N CacheFileInputStream
-  ReportStorageMemoryData data;
-  data.mHandleReport = aHandleReport;
-  data.mData = aData;
-  sGlobalEntryTables->EnumerateRead(&ReportStorageMemory, &data);
+  if (sGlobalEntryTables) {
+    ReportStorageMemoryData data;
+    data.mHandleReport = aHandleReport;
+    data.mData = aData;
+    sGlobalEntryTables->EnumerateRead(&ReportStorageMemory, &data);
+  }
 
   return NS_OK;
 }
 
 } // net
 } // mozilla