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 411140 848f4ef30978ebbe1126012e0d1a29b59d8626ac
parent 411139 1b6666eb3b815fb289b8dc342f35fea47dffdb1b
child 411141 ea7282078b054f7618bd1e8b54b544f18e2a4fff
push id28842
push userbmo:ttromey@mozilla.com
push dateWed, 07 Sep 2016 17:09:16 +0000
reviewersgfritzsche
bugs1218576
milestone51.0a1
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);