Guard appomni/greomni with UXP_CUSTOM_OMNI env var.
This commit is contained in:
parent
7c26515f2c
commit
9679fd7d72
|
@ -712,6 +712,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
|
|||
if (Omnijar::IsInitialized()) {
|
||||
// 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);
|
||||
if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
|
||||
|
|
|
@ -4158,6 +4158,8 @@ XRE_InitCommandLine(int aArgc, char* aArgv[])
|
|||
delete[] canonArgs;
|
||||
#endif
|
||||
|
||||
if (PR_GetEnv("UXP_CUSTOM_OMNI")) {
|
||||
// Process CLI parameters for specifying custom omnijars
|
||||
const char *path = nullptr;
|
||||
ArgResult ar = CheckArg("greomni", true, &path);
|
||||
if (ar == ARG_BAD) {
|
||||
|
@ -4197,6 +4199,8 @@ XRE_InitCommandLine(int aArgc, char* aArgv[])
|
|||
}
|
||||
|
||||
mozilla::Omnijar::Init(greOmni, appOmni);
|
||||
} // UXP_CUSTOM_OMNI
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user