Bug 717538 - Enable crash reporter in application.ini with MOZ_CRASHREPORTER instead of MOZILLA_OFFICIAL. r=ted

This commit is contained in:
Mike Hommey 2013-08-30 11:10:57 +09:00
parent 9ca1f4b4a7
commit e47ffb7d1d
3 changed files with 14 additions and 4 deletions

View File

@ -57,8 +57,8 @@ ifdef MOZ_APP_PROFILE
DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
endif
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
ifdef MOZ_CRASHREPORTER
DEFINES += -DMOZ_CRASHREPORTER
endif
ifdef MOZ_PROFILE_MIGRATOR

View File

@ -37,8 +37,8 @@ EnableProfileMigrator=1
EnableExtensionManager=1
#endif
#if MOZ_CRASHREPORTER
[Crash Reporter]
#if MOZILLA_OFFICIAL
Enabled=1
#endif
ServerURL=https://crash-reports.mozilla.com/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSION@&buildid=@APP_BUILDID@
#endif

View File

@ -802,9 +802,19 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
if (gExceptionHandler)
return NS_ERROR_ALREADY_INITIALIZED;
#if defined(MOZ_DEBUG)
// 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)
doReport = false;