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:
committed by
Commit Bot
parent
675513b96a
commit
3d55ed6cd6
@ -244,7 +244,7 @@ void RtcEventLogImpl::LogToMemory(std::unique_ptr<RtcEvent> event) {
|
|||||||
std::deque<std::unique_ptr<RtcEvent>>& container =
|
std::deque<std::unique_ptr<RtcEvent>>& container =
|
||||||
event->IsConfigEvent() ? config_history_ : history_;
|
event->IsConfigEvent() ? config_history_ : history_;
|
||||||
const size_t container_max_size =
|
const size_t container_max_size =
|
||||||
event->IsConfigEvent() ? kMaxEventsInHistory : kMaxEventsInConfigHistory;
|
event->IsConfigEvent() ? kMaxEventsInConfigHistory : kMaxEventsInHistory;
|
||||||
|
|
||||||
if (container.size() >= container_max_size) {
|
if (container.size() >= container_max_size) {
|
||||||
container.pop_front();
|
container.pop_front();
|
||||||
|
|||||||
Reference in New Issue
Block a user