Bug 821182 - Get firefox executable from the directory service instead of guesswork from CurProcD. r=past
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 14 Dec 2012 08:32:57 +0100
changeset 121612 6fe5b65e41ed5a97665838b0fd03e0c7f254631a
parent 121611 a9f1337be665367223aa3d0dfe01792de18e55c9
child 121613 3d898c39d05e155caab76d6635f8ecf4de3ad35a
push idunknown
push userunknown
push dateunknown
reviewerspast
bugs821182
milestone20.0a1
Bug 821182 - Get firefox executable from the directory service instead of guesswork from CurProcD. r=past
browser/devtools/debugger/DebuggerUI.jsm
--- a/browser/devtools/debugger/DebuggerUI.jsm
+++ b/browser/devtools/debugger/DebuggerUI.jsm
@@ -531,19 +531,17 @@ ChromeDebuggerProcess.prototype = {
   },
 
   /**
    * Creates and initializes the profile & process for the remote debugger.
    */
   _create: function RDP__create() {
     this.globalUI._chromeDebugger = this;
 
-    let file = FileUtils.getFile("CurProcD",
-      [Services.appinfo.OS == "WINNT" ? "firefox.exe"
-                                      : "firefox-bin"]);
+    let file = Services.dirsvc.get("XREExeF", Ci.nsIFile);
 
     let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
     process.init(file);
 
     let args = [
       "-no-remote", "-P", this._dbgProfile.name,
       "-chrome", DBG_XUL];