Bug 1559322 - Use "GreD" and "GreBinD" instead of "CurProcD" to remove macOS-specific hack and influence from firefox-appdir. r=keeler
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 18 Jun 2019 18:43:05 +0000
changeset 479144 9e8b490acc3bafc44b3cafd9b3472bac3d9d353c
parent 479143 929d55b41980d578f0bd2600531306cc96cda0dd
child 479145 88ac974e3453cb29f1c946bbb044654b18c4c973
push id36170
push usercbrindusan@mozilla.com
push dateWed, 19 Jun 2019 03:56:45 +0000
treeherdermozilla-central@5f0f37756053 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler
bugs1559322
milestone69.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 1559322 - Use "GreD" and "GreBinD" instead of "CurProcD" to remove macOS-specific hack and influence from firefox-appdir. r=keeler Differential Revision: https://phabricator.services.mozilla.com/D35011
security/manager/ssl/tests/unit/head_psm.js
--- a/security/manager/ssl/tests/unit/head_psm.js
+++ b/security/manager/ssl/tests/unit/head_psm.js
@@ -498,23 +498,22 @@ function add_connection_test(aHost, aExp
                               .QueryInterface(Ci.nsITransportSecurityInfo));
       }
       run_next_test();
     });
   });
 }
 
 function _getBinaryUtil(binaryUtilName) {
-  let utilBin = Services.dirsvc.get("CurProcD", Ci.nsIFile);
-  // On macOS, CurProcD is .../Contents/Resources, and most binary utilities
-  // are located there, but certutil is in .../Contents/MacOS, so we have to
-  // change the path accordingly.
-  if (Services.appinfo.OS === "Darwin" && binaryUtilName === "certutil") {
-    utilBin = utilBin.parent;
-    utilBin.append("MacOS");
+  let utilBin = Services.dirsvc.get("GreD", Ci.nsIFile);
+  // On macOS, GreD is .../Contents/Resources, and most binary utilities
+  // are located there, but certutil is in GreBinD (or .../Contents/MacOS),
+  // so we have to change the path accordingly.
+  if (binaryUtilName === "certutil") {
+    utilBin = Services.dirsvc.get("GreBinD", Ci.nsIFile);
   }
   utilBin.append(binaryUtilName + mozinfo.bin_suffix);
   // If we're testing locally, the above works. If not, the server executable
   // is in another location.
   if (!utilBin.exists()) {
     utilBin = Services.dirsvc.get("CurWorkD", Ci.nsIFile);
     while (utilBin.path.includes("xpcshell")) {
       utilBin = utilBin.parent;