Fix bug that applies wrong size limit to RtcEventLog history.

Bug: webrtc:8111
Change-Id: I13dc8c5fcf7c7b897265710e3643666fa7563986
Reviewed-on: https://webrtc-review.googlesource.com/21381
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20618}
This commit is contained in:
Bjorn Terelius 2017-11-08 18:07:36 +01:00 committed by Commit Bot
parent 675513b96a
commit 3d55ed6cd6

View file

@ -244,7 +244,7 @@ void RtcEventLogImpl::LogToMemory(std::unique_ptr<RtcEvent> event) {
std::deque<std::unique_ptr<RtcEvent>>& container =
event->IsConfigEvent() ? config_history_ : history_;
const size_t container_max_size =
event->IsConfigEvent() ? kMaxEventsInHistory : kMaxEventsInConfigHistory;
event->IsConfigEvent() ? kMaxEventsInConfigHistory : kMaxEventsInHistory;
if (container.size() >= container_max_size) {
container.pop_front();