Bug 1615045 - Remove extraneous extra write to StartupCache r=froydnj
authorDoug Thayer <dothayer@mozilla.com>
Fri, 14 Feb 2020 20:29:21 +0000
changeset 514152 e69118b085175bdec2b8d454a60e5b3406cd6799
parent 514151 26fda83f810f6ced8b37014c203cbc2d5c29c9bb
child 514153 c68528f299eb0ba9f3b54fc5b516fb40f882499f
push id37125
push usershindli@mozilla.com
push dateSat, 15 Feb 2020 09:56:17 +0000
treeherdermozilla-central@02b1aa498dd2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1615045
milestone75.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 1615045 - Remove extraneous extra write to StartupCache r=froydnj This was just left in, and does not need to be here. We want to be spawning the background thread here which we will wait on from xpcom-shutdown. Differential Revision: https://phabricator.services.mozilla.com/D62848
startupcache/StartupCache.cpp
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -596,26 +596,16 @@ void StartupCache::InvalidateCache(bool 
 
 void StartupCache::MaybeInitShutdownWrite() {
   if (mTimer) {
     mTimer->Cancel();
   }
   gShutdownInitiated = true;
 
   MaybeSpawnWriteThread();
-
-  // If we shutdown quickly timer wont have fired. Instead of writing
-  // it on the main thread and block the shutdown we simply wont update
-  // the startup cache. Always do this if the file doesn't exist since
-  // we use it part of the package step.
-  if (!mCacheData.initialized() || ShouldCompactCache()) {
-    mDirty = true;
-    auto result = WriteToDisk();
-    Unused << NS_WARN_IF(result.isErr());
-  }
 }
 
 void StartupCache::IgnoreDiskCache() {
   gIgnoreDiskCache = true;
   if (gStartupCache) gStartupCache->InvalidateCache();
 }
 
 /*