diff options
author | Moonchild <moonchild@palemoon.org> | 2022-05-09 22:38:16 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-05-09 22:38:16 +0000 |
commit | 9edf1b7bea5ff893f88911fc1a6a2dca3faeece9 (patch) | |
tree | 98bd9b0c7e3ca3e517e9e43dea157707b13f6bdb /ipc | |
parent | 930ddd693be251c86ee904dafbaef38234b692c0 (diff) | |
download | uxp-getnativepath-work.tar.gz |
Issue #1896 - Port GetNativePath changes from GRE.getnativepath-work
Diffstat (limited to 'ipc')
-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) |