Bug 1108056: Fix AutoConfig on OSX, broken by the package layout changes due to v2 signatures. Original patch by :mkaply. r=bsmedberg a=lsblakk
authorStephen Pohl <spohl.mozilla.bugs@gmail.com>
Fri, 19 Dec 2014 16:23:01 -0500
changeset 242517 b9ec1831c7259ebc9b0b6ff8382dc7ad20f75f25
parent 242516 68deb6424c5b1c88fe86b1483bf5cec2cdc9cf55
child 242518 ea2567a86c38151e83cd402ae1f7bf69ed2307c5
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, lsblakk
bugs1108056
milestone36.0a2
Bug 1108056: Fix AutoConfig on OSX, broken by the package layout changes due to v2 signatures. Original patch by :mkaply. r=bsmedberg a=lsblakk
extensions/pref/autoconfig/src/nsReadConfig.cpp
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -234,22 +234,22 @@ nsresult nsReadConfig::openAndEvaluateJS
                                              bool isEncoded,
                                              bool isBinDir)
 {
     nsresult rv;
 
     nsCOMPtr<nsIInputStream> inStr;
     if (isBinDir) {
         nsCOMPtr<nsIFile> jsFile;
-        rv = NS_GetSpecialDirectory(XRE_EXECUTABLE_FILE,
+        rv = NS_GetSpecialDirectory(NS_GRE_DIR,
                                     getter_AddRefs(jsFile));
         if (NS_FAILED(rv)) 
             return rv;
 
-        rv = jsFile->SetNativeLeafName(nsDependentCString(aFileName));
+        rv = jsFile->AppendNative(nsDependentCString(aFileName));
         if (NS_FAILED(rv)) 
             return rv;
 
         rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
         if (NS_FAILED(rv)) 
             return rv;
 
     } else {