This CL adds a number of debug-mode checks for inconsistent state, and if in release mode will reset the history instead of crashing. Bug: webrtc:10794 Change-Id: If099a1bb61314177cdad633d0fbdca052cd3a5ab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144525 Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28475}