Backed out changeset ee46537edfbc (bug 1218576)

This commit is contained in:
Sebastian Hengst 2016-08-30 19:58:29 +02:00
Родитель 9150f55c5b
Коммит 248a404d46
1 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -1854,7 +1854,12 @@ internal_AccumulateChildKeyed(mozilla::Telemetry::ID aId,
id.Append(th.id());
id.AppendLiteral(CHILD_HISTOGRAM_SUFFIX);
KeyedHistogram* keyed = internal_GetKeyedHistogramById(id);
MOZ_ASSERT(keyed);
if (!keyed) {
const nsDependentCString expiration(th.expiration());
keyed = new KeyedHistogram(id, expiration, th.histogramType, th.min, th.max,
th.bucketCount, th.dataset);
gKeyedHistograms.Put(id, keyed);
}
keyed->Add(aKey, aSample);
}
@ -1937,16 +1942,6 @@ void TelemetryHistogram::InitializeGlobalState(bool canRecordBase,
const nsDependentCString expiration(h.expiration());
gKeyedHistograms.Put(id, new KeyedHistogram(id, expiration, h.histogramType,
h.min, h.max, h.bucketCount, h.dataset));
if (XRE_IsParentProcess()) {
// We must create registered child keyed histograms as well or else the
// same code in TelemetrySession.jsm that fails without parent keyed
// histograms will fail without child keyed histograms.
nsCString childId(id);
childId.AppendLiteral(CHILD_HISTOGRAM_SUFFIX);
gKeyedHistograms.Put(childId,
new KeyedHistogram(id, expiration, h.histogramType,
h.min, h.max, h.bucketCount, h.dataset));
}
}
// Some Telemetry histograms depend on the value of C++ constants and hardcode