Bug 1517505 - Remove app/feature and bootstrap exceptions from all_files_referenced test r=Gijs
authorDhyey Thakore <dhyey35@gmail.com>
Tue, 08 Jan 2019 15:25:50 +0000
changeset 512908 6bc15d28e6ec
parent 512907 270584ef33a9
child 512909 9d3a199acc6e
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1517505
milestone66.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 1517505 - Remove app/feature and bootstrap exceptions from all_files_referenced test r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D15783
browser/base/content/test/static/browser_all_files_referenced.js
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -337,23 +337,16 @@ function addCodeReference(url, fromURI) 
     return;
 
   let ref;
   if (gReferencesFromCode.has(url)) {
     ref = gReferencesFromCode.get(url);
     if (ref === null)
       return;
   } else {
-    // Mark any file referenced by a 'features' bootstrap.js file as
-    // unconditionally referenced. The features folder is only in
-    // resource://app/ for non-packaged builds.
-    if (/resource:\/\/app\/features\/[^/]+\/bootstrap\.js/.test(from)) {
-      gReferencesFromCode.set(url, null);
-      return;
-    }
     ref = new Set();
     gReferencesFromCode.set(url, ref);
   }
   ref.add(from);
 }
 
 function listCodeReferences(refs) {
   let refList = [];
@@ -675,19 +668,16 @@ add_task(async function checkAllTheFiles
   let isUnreferenced = file => {
     if (gExceptionPaths.some(e => file.startsWith(e)))
       return false;
     if (gReferencesFromCode.has(file)) {
       let refs = gReferencesFromCode.get(file);
       if (refs === null)
         return false;
       for (let ref of refs) {
-        if (ref.endsWith("!/bootstrap.js"))
-          return false;
-
         if (isDevtools) {
           if (ref.startsWith("resource://app/components/") ||
               (file.startsWith("chrome://") && ref.startsWith("resource://")))
             return false;
         }
 
         if (gReferencesFromCode.has(ref)) {
           let refType = gReferencesFromCode.get(ref);
@@ -750,33 +740,16 @@ add_task(async function checkAllTheFiles
       if (file.startsWith("resource://")) {
         info("unreferenced devtools resource file: " + file);
         return false;
       }
       return true;
     });
   }
 
-  unreferencedFiles = unreferencedFiles.filter(file => {
-    // resource://app/features/ will only contain .xpi files when the test runs
-    // on a packaged build, so the following two exceptions only matter when
-    // running the test on a local non-packaged build.
-
-    if (/resource:\/\/app\/features\/[^/]+\/bootstrap\.js/.test(file)) {
-      info("not reporting feature boostrap file: " + file);
-      return false;
-    }
-    // Bug 1351892 - can stop shipping these?
-    if (/resource:\/\/app\/features\/[^/]+\/chrome\/skin\//.test(file)) {
-      info("not reporting feature skin file that may be for another platform: " + file);
-      return false;
-    }
-    return true;
-  });
-
   is(unreferencedFiles.length, 0, "there should be no unreferenced files");
   for (let file of unreferencedFiles) {
     let refs = gReferencesFromCode.get(file);
     if (refs === undefined) {
       ok(false, "unreferenced file: " + file);
     } else {
       let refList = listCodeReferences(refs);
       let msg = "file only referenced from unreferenced files: " + file;