Bug 1459144 - Fix CountHistogram deserialization for GeckoView. r?chutten,janerik
This adds all the samples from the provided sample set to the CountHistogram's
storage, instead of just adding 1 sample of value 1. This change does not affect
code outside of GeckoView persistence since |AddSampleSet| is not used in other
places.
MozReview-Commit-ID: 9bE0M9dgrtE
--- a/ipc/chromium/src/base/histogram.cc
+++ b/ipc/chromium/src/base/histogram.cc
@@ -698,13 +698,13 @@ CountHistogram::AddSampleSet(const Sampl
const size_t indices[] = { BucketIndex(0), BucketIndex(1), BucketIndex(2) };
if (sample.counts(indices[1]) != 0 || sample.counts(indices[2]) != 0) {
return;
}
if (sample.counts(indices[0]) != 0) {
- Accumulate(1, sample.counts(indices[0]), indices[0]);
+ Histogram::AddSampleSet(sample);
}
}
} // namespace base