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 313003 848f4ef30978
parent 313002 1b6666eb3b81
child 313004 ea7282078b05
push id20479
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 01:08:46 +0000
treeherderfx-team@fb7c6b034329 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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);