diff -r ff06037ec39c -r 0f6539389500 mozilla-crashreporter-restart-args.patch --- a/mozilla-crashreporter-restart-args.patch Mon Jul 23 06:33:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# HG changeset patch -# User Wolfgang Rosenauer -# Parent 07bb4ecfd6d6cc16360e7a32ee10b885d523f20d -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 -@@ -1360,32 +1360,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;