Bug 866937 - Enable crashreporter by default on debug gonk builds, r=ted

This commit is contained in:
Andrew Halberstadt 2013-11-29 11:15:39 -05:00
parent 96af7cfe8c
commit d15144c4e5

View File

@ -805,18 +805,20 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
if (gExceptionHandler)
return NS_ERROR_ALREADY_INITIALIZED;
#if defined(DEBUG)
#if !defined(DEBUG) || defined(MOZ_WIDGET_GONK)
// In non-debug builds, enable the crash reporter by default, and allow
// disabling it with the MOZ_CRASHREPORTER_DISABLE environment variable.
// Also enable it by default in debug gonk builds as it is difficult to
// set environment on startup.
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
if (envvar && *envvar && !force)
return NS_OK;
#else
// In debug builds, disable the crash reporter by default, and allow to
// enable it with the MOZ_CRASHREPORTER environment variable.
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER");
if ((!envvar || !*envvar) && !force)
return NS_OK;
#else
// In non-debug builds, enable the crash reporter by default, and allow
// to disable it with the MOZ_CRASHREPORTER_DISABLE environment variable.
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
if (envvar && *envvar && !force)
return NS_OK;
#endif
#if defined(MOZ_WIDGET_GONK)