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
--- 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);