forked from pool/MozillaFirefox
ec5d636a3c
- license change from tri license to MPL-2.0 - fix crashreporter restart option (bmo#762780) - reenabled mozilla-yarr-pcre.patch to fix build for PPC - require NSS 3.13.5 - remove mozjs pacrunner obsoletes again for now - adopted mozilla-prefer_plugin_pref.patch OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=284
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
# HG changeset patch
|
|
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
|
# Parent 0373328cfcb6ad3995f53598e974d61252ddebf4
|
|
Bug 762780 - crashreporter restart command should support MOZ_APP_LAUNCHER
|
|
|
|
diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp
|
|
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
|
|
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
|
|
@@ -1353,32 +1353,25 @@ nsresult
|
|
SetRestartArgs(int argc, char** argv)
|
|
{
|
|
if (!gExceptionHandler)
|
|
return NS_OK;
|
|
|
|
int i;
|
|
nsCAutoString envVar;
|
|
char *env;
|
|
+ char *argv1 = getenv("MOZ_APP_LAUNCHER");
|
|
for (i = 0; i < argc; i++) {
|
|
envVar = "MOZ_CRASHREPORTER_RESTART_ARG_";
|
|
envVar.AppendInt(i);
|
|
envVar += "=";
|
|
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
|
- // we'd like to run the script around the binary
|
|
- // instead of the binary itself, so remove the -bin
|
|
- // if it exists on the first argument
|
|
- int arg_len = 0;
|
|
- if (i == 0 &&
|
|
- (arg_len = strlen(argv[i])) > 4 &&
|
|
- strcmp(argv[i] + arg_len - 4, "-bin") == 0) {
|
|
- envVar.Append(argv[i], arg_len - 4);
|
|
- } else
|
|
-#endif
|
|
- {
|
|
+ if (argv1 && i == 0) {
|
|
+ // Is there a request to suppress default binary launcher?
|
|
+ envVar += argv1;
|
|
+ } else {
|
|
envVar += argv[i];
|
|
}
|
|
|
|
// PR_SetEnv() wants the string to be available for the lifetime
|
|
// of the app, so dup it here
|
|
env = ToNewCString(envVar);
|
|
if (!env)
|
|
return NS_ERROR_OUT_OF_MEMORY;
|