Backed out changeset de151ad69bd6 (bug 1003968) for build bustage. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Wed, 21 Aug 2019 12:48:14 +0300
changeset 489152 63dc43dba90a00922b7fa994193fa8729e2e3ea4
parent 489151 bdba80dae6e2e2ae62405f8d9a723d3a2834ef9e
child 489153 a213b28dd40fe20af80a2bafcc6ae7c075da157a
push id36465
push userdvarga@mozilla.com
push dateWed, 21 Aug 2019 16:47:43 +0000
treeherdermozilla-central@4ab60925635c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1003968
milestone70.0a1
backs outde151ad69bd613efce11317b30c51bdeeb936f30
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 changeset de151ad69bd6 (bug 1003968) for build bustage. CLOSED TREE
browser/base/content/test/performance/browser_startup_mainthreadio.js
browser/components/dirprovider/DirectoryProvider.cpp
toolkit/components/search/SearchService.jsm
--- a/browser/base/content/test/performance/browser_startup_mainthreadio.js
+++ b/browser/base/content/test/performance/browser_startup_mainthreadio.js
@@ -550,16 +550,23 @@ const startupPhases = {
     {
       path: "XREAppFeat:webcompat-reporter@mozilla.org.xpi",
       condition: !WIN,
       ignoreIfUnused: true,
       stat: 1,
       close: 1,
     },
     {
+      // bug 1003968
+      path: "XREAppDist:searchplugins",
+      condition: WIN,
+      ignoreIfUnused: true, // with WebRender enabled this may happen during "before becoming idle"
+      stat: 1,
+    },
+    {
       path: "XCurProcD:extensions",
       condition: WIN,
       stat: 1,
     },
   ],
 
   // Things that are expected to be completely out of the startup path
   // and loaded lazily when used for the first time by the user should
@@ -653,16 +660,23 @@ const startupPhases = {
       stat: 2,
     },
     {
       path: "ProfD:",
       condition: WIN,
       ignoreIfUnused: true,
       stat: 3,
     },
+    {
+      // bug 1003968
+      path: "XREAppDist:searchplugins",
+      condition: WIN,
+      ignoreIfUnused: true, // with WebRender enabled this may happen during "before handling user events"
+      stat: 1,
+    },
   ],
 };
 
 for (let name of [
   "d3d11layers",
   "d3d9video",
   "glcontext",
   "d3d11video",
--- a/browser/components/dirprovider/DirectoryProvider.cpp
+++ b/browser/components/dirprovider/DirectoryProvider.cpp
@@ -59,21 +59,26 @@ DirectoryProvider::GetFile(const char* a
 static void AppendDistroSearchDirs(nsIProperties* aDirSvc,
                                    nsCOMArray<nsIFile>& array) {
   nsCOMPtr<nsIFile> searchPlugins;
   nsresult rv = aDirSvc->Get(XRE_APP_DISTRIBUTION_DIR, NS_GET_IID(nsIFile),
                              getter_AddRefs(searchPlugins));
   if (NS_FAILED(rv)) return;
   searchPlugins->AppendNative(NS_LITERAL_CSTRING("searchplugins"));
 
+  bool exists;
+  rv = searchPlugins->Exists(&exists);
+  if (NS_FAILED(rv) || !exists) return;
+
   nsCOMPtr<nsIFile> commonPlugins;
   rv = searchPlugins->Clone(getter_AddRefs(commonPlugins));
   if (NS_SUCCEEDED(rv)) {
     commonPlugins->AppendNative(NS_LITERAL_CSTRING("common"));
-    array.AppendObject(commonPlugins);
+    rv = commonPlugins->Exists(&exists);
+    if (NS_SUCCEEDED(rv) && exists) array.AppendObject(commonPlugins);
   }
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (prefs) {
     nsCOMPtr<nsIFile> localePlugins;
     rv = searchPlugins->Clone(getter_AddRefs(localePlugins));
     if (NS_FAILED(rv)) return;
 
@@ -82,31 +87,37 @@ static void AppendDistroSearchDirs(nsIPr
     nsAutoCString defLocale;
     rv = prefs->GetCharPref("distribution.searchplugins.defaultLocale",
                             defLocale);
     if (NS_SUCCEEDED(rv)) {
       nsCOMPtr<nsIFile> defLocalePlugins;
       rv = localePlugins->Clone(getter_AddRefs(defLocalePlugins));
       if (NS_SUCCEEDED(rv)) {
         defLocalePlugins->AppendNative(defLocale);
-        array.AppendObject(defLocalePlugins);
-        return;  // all done
+        rv = defLocalePlugins->Exists(&exists);
+        if (NS_SUCCEEDED(rv) && exists) {
+          array.AppendObject(defLocalePlugins);
+          return;  // all done
+        }
       }
     }
 
     // we didn't have a defaultLocale, use the user agent locale
     nsAutoCString locale;
     LocaleService::GetInstance()->GetAppLocaleAsLangTag(locale);
 
     nsCOMPtr<nsIFile> curLocalePlugins;
     rv = localePlugins->Clone(getter_AddRefs(curLocalePlugins));
     if (NS_SUCCEEDED(rv)) {
       curLocalePlugins->AppendNative(locale);
-      array.AppendObject(curLocalePlugins);
-      return;  // all done
+      rv = curLocalePlugins->Exists(&exists);
+      if (NS_SUCCEEDED(rv) && exists) {
+        array.AppendObject(curLocalePlugins);
+        return;  // all done
+      }
     }
   }
 }
 
 NS_IMETHODIMP
 DirectoryProvider::GetFiles(const char* aKey, nsISimpleEnumerator** aResult) {
   if (!strcmp(aKey, NS_APP_DISTRIBUTION_SEARCH_DIR_LIST)) {
     nsCOMPtr<nsIProperties> dirSvc(
@@ -150,16 +161,20 @@ DirectoryProvider::AppendingEnumerator::
     if (!mNext) continue;
 
     char const* const* i = mAppendList;
     while (*i) {
       mNext->AppendNative(nsDependentCString(*i));
       ++i;
     }
 
+    bool exists;
+    rv = mNext->Exists(&exists);
+    if (NS_SUCCEEDED(rv) && exists) break;
+
     mNext = nullptr;
   }
 
   return NS_OK;
 }
 
 DirectoryProvider::AppendingEnumerator::AppendingEnumerator(
     nsISimpleEnumerator* aBase, char const* const* aAppendList)
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -1057,20 +1057,16 @@ SearchService.prototype = {
         winPattern: "*.xml",
       });
       try {
         // Add dir to distDirs if it contains any files.
         let { done } = await iterator.next();
         if (!done) {
           distDirs.push(dir);
         }
-      } catch (ex) {
-        if (!(ex instanceof OS.File.Error) || !ex.becauseNoSuchFile) {
-          throw ex;
-        }
       } finally {
         iterator.close();
       }
     }
 
     function notInCacheVisibleEngines(engineName) {
       return !cache.visibleDefaultEngines.includes(engineName);
     }