Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/WebKit/Source/core/html/track/TextTrack.cpp

Issue 1999813002: Revert of media/track: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/track/TextTrack.cpp
diff --git a/third_party/WebKit/Source/core/html/track/TextTrack.cpp b/third_party/WebKit/Source/core/html/track/TextTrack.cpp
index e7d36208ff57983938193c43529b6445388c61b1..c1112a418d9a66847140f82141e10de8ea5702ab 100644
--- a/third_party/WebKit/Source/core/html/track/TextTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/TextTrack.cpp
@@ -144,7 +144,7 @@
void TextTrack::setMode(const AtomicString& mode)
{
- DCHECK(mode == disabledKeyword() || mode == hiddenKeyword() || mode == showingKeyword());
+ ASSERT(mode == disabledKeyword() || mode == hiddenKeyword() || mode == showingKeyword());
// On setting, if the new value isn't equal to what the attribute would currently
// return, the new value must be processed as follows ...
@@ -230,7 +230,7 @@
void TextTrack::addCue(TextTrackCue* cue)
{
- DCHECK(cue);
+ ASSERT(cue);
// TODO(93143): Add spec-compliant behavior for negative time values.
if (std::isnan(cue->startTime()) || std::isnan(cue->endTime()) || cue->startTime() < 0 || cue->endTime() < 0)
@@ -257,7 +257,7 @@
void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& exceptionState)
{
- DCHECK(cue);
+ ASSERT(cue);
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-removecue
@@ -273,13 +273,14 @@
// cue->track() == this implies that cue is in this track's list of cues,
// so this track should have a list of cues and the cue being removed
// should be in it.
- DCHECK(m_cues);
+ ASSERT(m_cues);
// 2. Remove cue from the method's TextTrack object's text track's text track list of cues.
- DCHECK(m_cues->remove(cue));
+ bool wasRemoved = m_cues->remove(cue);
+ ASSERT_UNUSED(wasRemoved, wasRemoved);
// If the cue is active, a timeline needs to be available.
- DCHECK(!cue->isActive() || cueTimeline());
+ ASSERT(!cue->isActive() || cueTimeline());
cue->setTrack(0);
@@ -369,7 +370,7 @@
{
// This method is called through cue->track(), which should imply that this
// track has a list of cues.
- DCHECK(m_cues && cue->track() == this);
+ ASSERT(m_cues && cue->track() == this);
// Make sure the TextTrackCueList order is up-to-date.
// FIXME: Only need to do this if the change was to any of the timestamps.
@@ -378,7 +379,7 @@
// Since a call to cueDidChange is always preceded by a call to
// cueWillChange, the cue should no longer be active when we reach this
// point (since it was removed from the timeline in cueWillChange).
- DCHECK(!cue->isActive());
+ ASSERT(!cue->isActive());
if (m_mode == disabledKeyword())
return;
@@ -390,7 +391,7 @@
int TextTrack::trackIndex()
{
- DCHECK(m_trackList);
+ ASSERT(m_trackList);
if (m_trackIndex == invalidTrackIndex)
m_trackIndex = m_trackList->getTrackIndex(this);
@@ -425,7 +426,7 @@
int TextTrack::trackIndexRelativeToRenderedTracks()
{
- DCHECK(m_trackList);
+ ASSERT(m_trackList);
if (m_renderedTrackIndex == invalidTrackIndex)
m_renderedTrackIndex = m_trackList->getTrackIndexRelativeToRenderedTracks(this);

Powered by Google App Engine
This is Rietveld 408576698