mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1526328 - Disable Telemetry recording in FUZZING builds. r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D19359 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a4d10aaa50
commit
67dd5df98e
@ -1106,6 +1106,9 @@ TelemetryImpl::SetCanRecordBase(bool canRecord) {
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
return NS_OK;
|
||||
}
|
||||
#ifdef FUZZING
|
||||
return NS_OK;
|
||||
#endif
|
||||
if (canRecord != mCanRecordBase) {
|
||||
TelemetryHistogram::SetCanRecordBase(canRecord);
|
||||
TelemetryScalar::SetCanRecordBase(canRecord);
|
||||
@ -1133,6 +1136,9 @@ TelemetryImpl::SetCanRecordExtended(bool canRecord) {
|
||||
if (recordreplay::IsRecordingOrReplaying()) {
|
||||
return NS_OK;
|
||||
}
|
||||
#ifdef FUZZING
|
||||
return NS_OK;
|
||||
#endif
|
||||
if (canRecord != mCanRecordExtended) {
|
||||
TelemetryHistogram::SetCanRecordExtended(canRecord);
|
||||
TelemetryScalar::SetCanRecordExtended(canRecord);
|
||||
@ -1171,6 +1177,7 @@ already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
|
||||
"CreateTelemetryInstance may only be called once, via GetService()");
|
||||
|
||||
bool useTelemetry = false;
|
||||
#ifndef FUZZING
|
||||
if ((XRE_IsParentProcess() || XRE_IsContentProcess() || XRE_IsGPUProcess() ||
|
||||
XRE_IsSocketProcess()) &&
|
||||
// Telemetry is never accumulated when recording or replaying, both
|
||||
@ -1180,6 +1187,7 @@ already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
|
||||
!recordreplay::IsRecordingOrReplaying()) {
|
||||
useTelemetry = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set current product (determines Fennec/GeckoView at runtime).
|
||||
SetCurrentProduct();
|
||||
|
@ -3836,7 +3836,9 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
|
||||
|
||||
SetShutdownChecks();
|
||||
|
||||
// Enable Telemetry IO Reporting on DEBUG, nightly and local builds
|
||||
// Enable Telemetry IO Reporting on DEBUG, nightly and local builds,
|
||||
// but disable it on FUZZING builds.
|
||||
#ifndef FUZZING
|
||||
#ifdef DEBUG
|
||||
mozilla::Telemetry::InitIOReporting(gAppData->xreDirectory);
|
||||
#else
|
||||
@ -3848,6 +3850,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
|
||||
}
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
#endif /* FUZZING */
|
||||
|
||||
#if defined(XP_WIN)
|
||||
// Enable the HeapEnableTerminationOnCorruption exploit mitigation. We ignore
|
||||
|
Loading…
Reference in New Issue
Block a user