Bug 789852 Use getComplexValue() with nsIFile for view_source.editor.path, which supports unicode path r=gavin
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 11 Sep 2012 17:20:06 +0900
changeset 104782 d042ad078f436e284610366dc39cebdcb6fa8658
parent 104781 4f5b4f0ecf01a4d9a1f5dcf114821acaec848c64
child 104783 e9615e179825a040c0e7e2670a19a21fb2429879
child 106837 ca3fa3fbe62ad72fa7db075d9d93843c959d6725
push id14675
push usermasayuki@d-toybox.com
push dateTue, 11 Sep 2012 08:20:25 +0000
treeherdermozilla-inbound@d042ad078f43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs789852
milestone18.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 789852 Use getComplexValue() with nsIFile for view_source.editor.path, which supports unicode path r=gavin
toolkit/components/viewsource/content/viewSourceUtils.js
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -183,24 +183,21 @@ var gViewSourceUtils = {
       aCallBack(result, data);
     }
   },
 
   // Returns nsIProcess of the external view source editor or null
   getExternalViewSourceEditor: function()
   {
     try {
-      let prefPath =
+      let viewSourceAppPath =
           Components.classes["@mozilla.org/preferences-service;1"]
                     .getService(Components.interfaces.nsIPrefBranch)
-                    .getCharPref("view_source.editor.path");
-      let viewSourceAppPath =
-              Components.classes["@mozilla.org/file/local;1"]
-                        .createInstance(Components.interfaces.nsILocalFile);
-      viewSourceAppPath.initWithPath(prefPath);
+                    .getComplexValue("view_source.editor.path",
+                                     Components.interfaces.nsIFile);
       let editor = Components.classes['@mozilla.org/process/util;1']
                              .createInstance(Components.interfaces.nsIProcess);
       editor.init(viewSourceAppPath);
 
       return editor;
     }
     catch (ex) {
       Components.utils.reportError(ex);