Backed out changeset 442a1725c992 (bug 1526328) for build bustages on Telemetry.cpp. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Mon, 11 Feb 2019 16:27:39 +0200
changeset 458501 68e3ee13edd9b8c8fa36c3a77491950f485cbadf
parent 458500 c5073e671318e41e99cead73210c0b4d9e887253
child 458502 5e84fb8430371c274cf211dfacc879e3921a3b80
push id77873
push usernbeleuzu@mozilla.com
push dateMon, 11 Feb 2019 14:28:00 +0000
treeherderautoland@68e3ee13edd9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1526328
milestone67.0a1
backs out442a1725c992f43393f4b0dcee1d6fbacf0963c1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 442a1725c992 (bug 1526328) for build bustages on Telemetry.cpp. CLOSED TREE
toolkit/components/telemetry/core/Telemetry.cpp
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/components/telemetry/core/Telemetry.cpp
+++ b/toolkit/components/telemetry/core/Telemetry.cpp
@@ -1101,19 +1101,16 @@ TelemetryImpl::GetCanRecordBase(bool* re
   return NS_OK;
 }
 
 NS_IMETHODIMP
 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);
     TelemetryEvent::SetCanRecordBase(canRecord);
     mCanRecordBase = canRecord;
   }
   return NS_OK;
 }
@@ -1131,19 +1128,16 @@ TelemetryImpl::GetCanRecordExtended(bool
   return NS_OK;
 }
 
 NS_IMETHODIMP
 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);
     TelemetryEvent::SetCanRecordExtended(canRecord);
     mCanRecordExtended = canRecord;
   }
   return NS_OK;
 }
@@ -1172,27 +1166,25 @@ TelemetryImpl::GetIsOfficialTelemetry(bo
 }
 
 already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
   MOZ_ASSERT(
       sTelemetry == nullptr,
       "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
       // because the resulting measurements might be biased and because
       // measurements might occur at non-deterministic points in execution
       // (e.g. garbage collections).
       !recordreplay::IsRecordingOrReplaying()) {
     useTelemetry = true;
   }
-#endif
 
   // Set current product (determines Fennec/GeckoView at runtime).
   SetCurrentProduct();
 
   // First, initialize the TelemetryHistogram and TelemetryScalar global states.
   TelemetryHistogram::InitializeGlobalState(useTelemetry, useTelemetry);
   TelemetryScalar::InitializeGlobalState(useTelemetry, useTelemetry);
 
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3831,31 +3831,28 @@ Result<bool, nsresult> XREMain::CheckLas
 int XREMain::XRE_mainStartup(bool* aExitFlag) {
   nsresult rv;
 
   if (!aExitFlag) return 1;
   *aExitFlag = false;
 
   SetShutdownChecks();
 
-  // Enable Telemetry IO Reporting on DEBUG, nightly and local builds,
-  // but disable it on FUZZING builds.
-#ifndef FUZZING
+  // Enable Telemetry IO Reporting on DEBUG, nightly and local builds
 #ifdef DEBUG
   mozilla::Telemetry::InitIOReporting(gAppData->xreDirectory);
 #else
   {
     const char* releaseChannel = NS_STRINGIFY(MOZ_UPDATE_CHANNEL);
     if (strcmp(releaseChannel, "nightly") == 0 ||
         strcmp(releaseChannel, "default") == 0) {
       mozilla::Telemetry::InitIOReporting(gAppData->xreDirectory);
     }
   }
 #endif /* DEBUG */
-#endif /* FUZZING */
 
 #if defined(XP_WIN)
   // Enable the HeapEnableTerminationOnCorruption exploit mitigation. We ignore
   // the return code because it always returns success, although it has no
   // effect on Windows older than XP SP3.
   HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
 #endif /* XP_WIN */