diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/histogram_synchronizer.cc | 3 | ||||
-rw-r--r-- | chrome/common/histogram_synchronizer.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/histogram_synchronizer.cc b/chrome/common/histogram_synchronizer.cc index 2a7e09a..9aeff5e 100644 --- a/chrome/common/histogram_synchronizer.cc +++ b/chrome/common/histogram_synchronizer.cc @@ -240,6 +240,9 @@ int HistogramSynchronizer::GetNextAvaibleSequenceNumber( RendererHistogramRequester requester) { AutoLock auto_lock(lock_); ++next_available_sequence_number_; + if (0 > next_available_sequence_number_) // We wrapped around. + next_available_sequence_number_ = kReservedSequenceNumber + 1; + DCHECK(next_available_sequence_number_ != kReservedSequenceNumber); if (requester == ASYNC_HISTOGRAMS) { async_sequence_number_ = next_available_sequence_number_; async_renderers_pending_ = 0; diff --git a/chrome/common/histogram_synchronizer.h b/chrome/common/histogram_synchronizer.h index 35e965e..1190555 100644 --- a/chrome/common/histogram_synchronizer.h +++ b/chrome/common/histogram_synchronizer.h @@ -26,6 +26,8 @@ class HistogramSynchronizer : public SYNCHRONOUS_HISTOGRAMS }; + static const int kReservedSequenceNumber = 0; + HistogramSynchronizer(); ~HistogramSynchronizer(); |