bug 1218576 - Ensure we can record before trying to record categorical histograms. r=gfritzsche
☠☠ backed out by 1530103e032c ☠ ☠
authorChris H-C <chutten@mozilla.com>
Fri, 12 Aug 2016 09:09:18 -0400
changeset 313028 848f4ef30978ebbe1126012e0d1a29b59d8626ac
parent 313027 1b6666eb3b815fb289b8dc342f35fea47dffdb1b
child 313029 ea7282078b054f7618bd1e8b54b544f18e2a4fff
push id30669
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 00:56:12 +0000
treeherdermozilla-central@77940cbf0c2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche
bugs1218576
milestone51.0a1
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
bug 1218576 - Ensure we can record before trying to record categorical histograms. r=gfritzsche Every other Accumulate call has it :S MozReview-Commit-ID: 8uWtADebuJ1
toolkit/components/telemetry/TelemetryHistogram.cpp
--- a/toolkit/components/telemetry/TelemetryHistogram.cpp
+++ b/toolkit/components/telemetry/TelemetryHistogram.cpp
@@ -2148,16 +2148,19 @@ TelemetryHistogram::Accumulate(const cha
   }
 }
 
 void
 TelemetryHistogram::AccumulateCategorical(mozilla::Telemetry::ID aId,
                                           const nsCString& label)
 {
   StaticMutexAutoLock locker(gTelemetryHistogramMutex);
+  if (!internal_CanRecordBase()) {
+    return;
+  }
   internal_HistogramAddCategorical(aId, label);
 }
 
 void
 TelemetryHistogram::AccumulateChild(const nsTArray<Accumulation>& aAccumulations)
 {
   MOZ_ASSERT(XRE_IsParentProcess());
   StaticMutexAutoLock locker(gTelemetryHistogramMutex);