Bug 1213170 - followup r=bustage on a CLOSED TREE
authorFabrice Desré <fabrice@mozilla.com>
Tue, 13 Oct 2015 11:35:57 -0700
changeset 267448 2bd66074e01a40d30016a28b53b2926a4368f5fe
parent 267447 eb95dd9f3b3fe3d2f7ed36323cf15b09e255429c
child 267449 83ab506fbe439c6f2e7588c9e0d63e09f1606ba5
push id29519
push usercbook@mozilla.com
push dateWed, 14 Oct 2015 10:29:57 +0000
treeherdermozilla-central@6307530f9f1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1213170
milestone44.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 1213170 - followup r=bustage on a CLOSED TREE
dom/apps/Webapps.jsm
--- a/dom/apps/Webapps.jsm
+++ b/dom/apps/Webapps.jsm
@@ -3733,33 +3733,33 @@ this.DOMApplicationRegistry = {
       useReviewerCerts = Services.prefs.
                            getBoolPref("dom.mozApps.use_reviewer_certs");
     } catch (ex) { }
 
     // We'll use the reviewer and dev certificates only if the pref is set to
     // true.
     if (useReviewerCerts) {
       let manifestPath = Services.io.newURI(aManifestURL, null, null).path;
+      let isReviewer = false;
+      // There are different reviewer paths for apps & addons so we keep
+      // them in a comma separated preference.
+      try {
+        let reviewerPaths =
+          Services.prefs.getCharPref("dom.apps.reviewer_paths").split(",");
+        isReviewer = reviewerPaths.some(path => { return manifestPath.startsWith(path); });
+      } catch(e) {}
 
       switch (aInstallOrigin) {
         case "https://marketplace.firefox.com":
-          root = manifestPath.startsWith("/reviewers/")
+          root = isReviewer
                ? Ci.nsIX509CertDB.AppMarketplaceProdReviewersRoot
                : Ci.nsIX509CertDB.AppMarketplaceProdPublicRoot;
           break;
 
         case "https://marketplace-dev.allizom.org":
-          // There are different reviewer paths for apps & addons so we keep
-          // them in a comma separated preference.
-          bool isReviewer = false;
-          try {
-            let reviewerPaths =
-              Services.prefs.getCharPref("dom.apps.reviewer_paths").split(",");
-            isReviewer = reviewerPaths.some(path => { return manifestPath.startsWith(path); });
-          } catch(e) {}
           root = isReviewer
                ? Ci.nsIX509CertDB.AppMarketplaceDevReviewersRoot
                : Ci.nsIX509CertDB.AppMarketplaceDevPublicRoot;
           break;
 
         // The staging server uses the same certificate for both
         // public and unreviewed apps.
         case "https://marketplace.allizom.org":