Backed out 2 changesets (bug 1544037) for build bustages at StartupCache.cpp on a CLOSED TREE
authorAndreea Pavel <apavel@mozilla.com>
Tue, 21 May 2019 17:06:26 +0300
changeset 474756 acd39065fd9fa5f7fe7a4530d5a991f64dcbc9a0
parent 474755 6cead9170981e6714d63dcd6d3032745ed661fe8
child 474757 1dad417c28ad49a3fb16130ef3b9272dc424e2c9
push id85970
push userapavel@mozilla.com
push dateTue, 21 May 2019 14:07:22 +0000
treeherderautoland@acd39065fd9f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1544037
milestone69.0a1
backs out8242c6c52f6c43eac5eee441a98a0742d553597f
c19e86931d1a72f32f5cd239998abdc00fdb3c1c
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
Backed out 2 changesets (bug 1544037) for build bustages at StartupCache.cpp on a CLOSED TREE Backed out changeset 8242c6c52f6c (bug 1544037) Backed out changeset c19e86931d1a (bug 1544037)
browser/base/content/test/performance/browser_startup_mainthreadio.js
startupcache/StartupCache.cpp
--- a/browser/base/content/test/performance/browser_startup_mainthreadio.js
+++ b/browser/base/content/test/performance/browser_startup_mainthreadio.js
@@ -183,16 +183,22 @@ const startupPhases = {
       condition: WIN,
       stat: 1,
     },
     { // bug 1544034
       path: "ProfLDS:startupCache/scriptCache.bin",
       condition: WIN,
       stat: 1,
     },
+    { // bug 1544037
+      path: "ProfLDS:startupCache/startupCache." +
+             (Services.appinfo.is64Bit ? 8 : 4) + ".little",
+      condition: WIN,
+      stat: 1,
+    },
     { // bug 1541601
       path: "PrfDef:channel-prefs.js",
       stat: 1,
       read: 1,
       close: 1,
     },
     { // At least the read seems unavoidable
       path: "PrefD:prefs.js",
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -199,23 +199,23 @@ nsresult StartupCache::Init() {
 
 /**
  * LoadArchive can be called from the main thread or while reloading cache on
  * write thread.
  */
 nsresult StartupCache::LoadArchive() {
   if (gIgnoreDiskCache) return NS_ERROR_FAILURE;
 
+  bool exists;
+  mArchive = nullptr;
+  nsresult rv = mFile->Exists(&exists);
+  if (NS_FAILED(rv) || !exists) return NS_ERROR_FILE_NOT_FOUND;
+
   mArchive = new nsZipArchive();
   rv = mArchive->OpenArchive(mFile);
-
-  if (NS_FAILED(rv)) {
-    mArchive = nullptr;
-  }
-
   return rv;
 }
 
 namespace {
 
 nsresult GetBufferFromZipArchive(nsZipArchive* zip, bool doCRC, const char* id,
                                  UniquePtr<char[]>* outbuf, uint32_t* length) {
   if (!zip) return NS_ERROR_NOT_AVAILABLE;