bug 1432855 - Early-return if we're asked to clear the expired histogram. r=gfritzsche

MozReview-Commit-ID: IH4BCDq8fgz
This commit is contained in:
Chris H-C 2018-01-24 16:26:29 -05:00
Родитель f9aaea1460
Коммит 1f517c62bd
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -383,6 +383,10 @@ void
internal_ClearHistogramById(HistogramID histogramId, ProcessID processId, SessionType sessionType)
{
size_t index = internal_HistogramStorageIndex(histogramId, processId, sessionType);
if (gHistogramStorage[index] == gExpiredHistogram) {
// We keep gExpiredHistogram until TelemetryHistogram::DeInitializeGlobalState
return;
}
delete gHistogramStorage[index];
gHistogramStorage[index] = nullptr;
}