Bug 767406 - don't assume the tables are initialized in StartupCache::WriteToDisk; r=mwu
authorNathan Froyd <froydnj@mozilla.com>
Wed, 10 Oct 2012 10:37:50 -0400
changeset 117891 ac7e592b097c3ff34e001731f65d7e65f5bd13c6
parent 117890 310e29c26ea3e6ec89770c2ae5428b67c0412467
child 117892 a3eab8fc98830938f3075753b79c577b4bf0b670
push id1997
push userakeybl@mozilla.com
push dateMon, 07 Jan 2013 21:25:26 +0000
treeherdermozilla-beta@4baf45cdcf21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs767406
milestone19.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 767406 - don't assume the tables are initialized in StartupCache::WriteToDisk; r=mwu
startupcache/StartupCache.cpp
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -409,17 +409,17 @@ CacheCloseHelper(const nsACString& key, 
  * to make sure there isn't a write happening on another thread
  */
 void
 StartupCache::WriteToDisk() 
 {
   nsresult rv;
   mStartupWriteInitiated = true;
 
-  if (mTable.Count() == 0)
+  if (!mTable.IsInitialized() || mTable.Count() == 0)
     return;
 
   nsCOMPtr<nsIZipWriter> zipW = do_CreateInstance("@mozilla.org/zipwriter;1");
   if (!zipW)
     return;
 
   rv = zipW->Open(mFile, PR_RDWR | PR_CREATE_FILE);
   if (NS_FAILED(rv)) {