Add extra RTC_CHECKs in RtcEventLog.

Bug: None
Change-Id: I8a7c5c1735f04c44f0ea99ae12cc984e9eb7a6ee
Reviewed-on: https://webrtc-review.googlesource.com/57960
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22202}
This commit is contained in:
Bjorn Terelius 2018-02-26 22:31:28 +01:00 committed by Commit Bot
parent 8c913efc1b
commit cf83ae094a
2 changed files with 2 additions and 1 deletions

View File

@ -244,6 +244,7 @@ std::string RtcEventLogEncoderLegacy::EncodeBatch(
for (auto it = begin; it != end; ++it) {
// TODO(terelius): Can we avoid the slight inefficiency of reallocating the
// string?
RTC_CHECK(it->get() != nullptr);
encoded_output += Encode(**it);
}
return encoded_output;

View File

@ -216,7 +216,7 @@ void RtcEventLogImpl::StopLogging() {
}
void RtcEventLogImpl::Log(std::unique_ptr<RtcEvent> event) {
RTC_DCHECK(event);
RTC_CHECK(event);
// Binding to |this| is safe because |this| outlives the |task_queue_|.
auto event_handler = [this](std::unique_ptr<RtcEvent> unencoded_event) {