diff options
Diffstat (limited to 'ipc/glue/GeckoChildProcessHost.cpp')
-rw-r--r-- | ipc/glue/GeckoChildProcessHost.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index e7c676c944..8a7b4ca5b8 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -666,8 +666,23 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt // Make sure that child processes can find the omnijar // See XRE_InitCommandLine in nsAppRunner.cpp newEnvVars["UXP_CUSTOM_OMNI"] = 1; - nsAutoCString path; nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE); +#ifdef XP_WIN + nsString path; + nsAutoCString childPath; + if (file && NS_SUCCEEDED(file->GetPath(path))) { + CopyUTF16toUTF8(path, childPath); + childArgv.push_back("-greomni"); + childArgv.push_back(childPath.get()); + } + file = Omnijar::GetPath(Omnijar::APP); + if (file && NS_SUCCEEDED(file->GetPath(path))) { + CopyUTF16toUTF8(path, childPath); + childArgv.push_back("-appomni"); + childArgv.push_back(childPath.get()); + } +#else + nsAutoCString path; if (file && NS_SUCCEEDED(file->GetNativePath(path))) { childArgv.push_back("-greomni"); childArgv.push_back(path.get()); @@ -677,6 +692,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt childArgv.push_back("-appomni"); childArgv.push_back(path.get()); } +#endif } // Add the application directory path (-appdir path) |