summaryrefslogtreecommitdiffstats
path: root/toolkit/xre
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-14 16:31:54 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-14 16:31:54 +0100
commit786417cf0fdce65ee642b1d126101ab79c72c847 (patch)
treee6350fa6ba55f6edafcf211f044fbeb207607700 /toolkit/xre
parent16fce4341d087924e51f465cc772b0899de1089d (diff)
downloadUXP-786417cf0fdce65ee642b1d126101ab79c72c847.tar
UXP-786417cf0fdce65ee642b1d126101ab79c72c847.tar.gz
UXP-786417cf0fdce65ee642b1d126101ab79c72c847.tar.lz
UXP-786417cf0fdce65ee642b1d126101ab79c72c847.tar.xz
UXP-786417cf0fdce65ee642b1d126101ab79c72c847.zip
Revert "Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var."
This reverts commit 2bdbca39b210e3f13ae42ccae36935d30b36eb31.
Diffstat (limited to 'toolkit/xre')
-rw-r--r--toolkit/xre/nsAppRunner.cpp72
1 files changed, 34 insertions, 38 deletions
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index d8f95c2a8..b27e46697 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4131,49 +4131,45 @@ 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) {
- PR_fprintf(PR_STDERR,
- "Error: argument --greomni requires a path argument or the "
- "--osint argument was specified with the --greomni argument "
- "which is invalid.\n");
- return NS_ERROR_FAILURE;
- }
-
- if (!path)
- return rv;
+ const char *path = nullptr;
+ ArgResult ar = CheckArg("greomni", true, &path);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR,
+ "Error: argument --greomni requires a path argument or the "
+ "--osint argument was specified with the --greomni argument "
+ "which is invalid.\n");
+ return NS_ERROR_FAILURE;
+ }
- nsCOMPtr<nsIFile> greOmni;
- rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni));
- if (NS_FAILED(rv)) {
- PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n");
- return rv;
- }
+ if (!path)
+ return rv;
- ar = CheckArg("appomni", true, &path);
- if (ar == ARG_BAD) {
- PR_fprintf(PR_STDERR,
- "Error: argument --appomni requires a path argument or the "
- "--osint argument was specified with the --appomni argument "
- "which is invalid.\n");
- return NS_ERROR_FAILURE;
- }
+ nsCOMPtr<nsIFile> greOmni;
+ rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni));
+ if (NS_FAILED(rv)) {
+ PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n");
+ return rv;
+ }
- nsCOMPtr<nsIFile> appOmni;
- if (path) {
- rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni));
- if (NS_FAILED(rv)) {
- PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n");
- return rv;
- }
- }
+ ar = CheckArg("appomni", true, &path);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR,
+ "Error: argument --appomni requires a path argument or the "
+ "--osint argument was specified with the --appomni argument "
+ "which is invalid.\n");
+ return NS_ERROR_FAILURE;
+ }
- mozilla::Omnijar::Init(greOmni, appOmni);
- } // UXP_CUSTOM_OMNI
+ nsCOMPtr<nsIFile> appOmni;
+ if (path) {
+ rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni));
+ if (NS_FAILED(rv)) {
+ PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n");
+ return rv;
+ }
+ }
+ mozilla::Omnijar::Init(greOmni, appOmni);
return rv;
}