зеркало из https://github.com/mozilla/pjs.git
Bug 383603 - Disable the crash-reporter hook entirely if MOZ_CRASHREPORTER_DISABLE is set, r=luser
This commit is contained in:
Родитель
6373626b42
Коммит
7458044109
|
@ -233,10 +233,14 @@ nsresult SetExceptionHandler(nsILocalFile* aXREDirectory,
|
|||
if (gExceptionHandler)
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
|
||||
if (envvar && *envvar)
|
||||
return NS_OK;
|
||||
|
||||
// this environment variable prevents us from launching
|
||||
// the crash reporter client
|
||||
const char* noReportEnv = PR_GetEnv("MOZ_CRASHREPORTER_NO_REPORT");
|
||||
if (noReportEnv && *noReportEnv)
|
||||
envvar = PR_GetEnv("MOZ_CRASHREPORTER_NO_REPORT");
|
||||
if (envvar && *envvar)
|
||||
doReport = false;
|
||||
|
||||
// allocate our strings
|
||||
|
@ -428,6 +432,9 @@ nsresult AnnotateCrashReport(const nsACString &key, const nsACString &data)
|
|||
nsresult
|
||||
SetRestartArgs(int argc, char **argv)
|
||||
{
|
||||
if (!gExceptionHandler)
|
||||
return NS_OK;
|
||||
|
||||
int i;
|
||||
nsCAutoString envVar;
|
||||
char *env;
|
||||
|
|
|
@ -152,7 +152,7 @@ main (int argc, char **argv)
|
|||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
|
||||
char* env = new char[13];
|
||||
strcpy(env, "MOZ_AIRBAG=1");
|
||||
strcpy(env, "MOZ_CRASHREPORTER=1");
|
||||
PR_SetEnv(env);
|
||||
|
||||
char* result = all_tests();
|
||||
|
|
Загрузка…
Ссылка в новой задаче