From 709757e7c20bdc0575f07881fc013cb9f6613ab9 Mon Sep 17 00:00:00 2001 From: Brad Lassey Date: Mon, 23 Nov 2015 18:27:23 -0500 Subject: [PATCH] bug 1198450 - Firefox fails to load about:home if Firefox was installed to a folder with non-Latin name r=jimm --- ipc/glue/GeckoChildProcessHost.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index 4bfa17c25d61..8a5304798f10 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -541,12 +541,15 @@ AddAppDirToCommandLine(std::vector& aCmdLine) NS_GET_IID(nsIFile), getter_AddRefs(appDir)); if (NS_SUCCEEDED(rv)) { +#if defined(XP_WIN) + nsString path; + MOZ_ALWAYS_TRUE(NS_SUCCEEDED(appDir->GetPath(path))); + aCmdLine.AppendLooseValue(UTF8ToWide("-appdir")); + std::wstring wpath = path.get(); + aCmdLine.AppendLooseValue(wpath); +#else nsAutoCString path; MOZ_ALWAYS_TRUE(NS_SUCCEEDED(appDir->GetNativePath(path))); -#if defined(XP_WIN) - aCmdLine.AppendLooseValue(UTF8ToWide("-appdir")); - aCmdLine.AppendLooseValue(UTF8ToWide(path.get())); -#else aCmdLine.push_back("-appdir"); aCmdLine.push_back(path.get()); #endif