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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible Created 3 years, 9 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/svg/animation/SMILTimeContainer.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
index ca9f7001d71be45cb7a58337920d7a2fcaa12898..726669696d7d51ad1a47741c5e56f72543d82b18 100644
--- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -61,9 +61,9 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner)
SMILTimeContainer::~SMILTimeContainer() {
cancelAnimationFrame();
cancelAnimationPolicyTimer();
- ASSERT(!m_wakeupTimer.isActive());
+ DCHECK(!m_wakeupTimer.isActive());
#if DCHECK_IS_ON()
- ASSERT(!m_preventScheduledAnimationsChanges);
+ DCHECK(!m_preventScheduledAnimationsChanges);
#endif
}
@@ -75,7 +75,7 @@ void SMILTimeContainer::schedule(SVGSMILElement* animation,
DCHECK(animation->hasValidTarget());
#if DCHECK_IS_ON()
- ASSERT(!m_preventScheduledAnimationsChanges);
+ DCHECK(!m_preventScheduledAnimationsChanges);
#endif
ElementAttributePair key(target, attributeName);
@@ -83,7 +83,7 @@ void SMILTimeContainer::schedule(SVGSMILElement* animation,
m_scheduledAnimations.insert(key, nullptr).storedValue->value;
if (!scheduled)
scheduled = new AnimationsLinkedHashSet;
- ASSERT(!scheduled->contains(animation));
+ DCHECK(!scheduled->contains(animation));
scheduled->insert(animation);
SMILTime nextFireTime = animation->nextProgressTime();
@@ -94,19 +94,19 @@ void SMILTimeContainer::schedule(SVGSMILElement* animation,
void SMILTimeContainer::unschedule(SVGSMILElement* animation,
SVGElement* target,
const QualifiedName& attributeName) {
- ASSERT(animation->timeContainer() == this);
+ DCHECK_EQ(animation->timeContainer(), this);
#if DCHECK_IS_ON()
- ASSERT(!m_preventScheduledAnimationsChanges);
+ DCHECK(!m_preventScheduledAnimationsChanges);
#endif
ElementAttributePair key(target, attributeName);
GroupedAnimationsMap::iterator it = m_scheduledAnimations.find(key);
- ASSERT(it != m_scheduledAnimations.end());
+ DCHECK_NE(it, m_scheduledAnimations.end());
AnimationsLinkedHashSet* scheduled = it->value.get();
- ASSERT(scheduled);
+ DCHECK(scheduled);
AnimationsLinkedHashSet::iterator itAnimation = scheduled->find(animation);
- ASSERT(itAnimation != scheduled->end());
+ DCHECK(itAnimation != scheduled->end());
scheduled->erase(itAnimation);
if (scheduled->isEmpty())
@@ -271,17 +271,17 @@ void SMILTimeContainer::cancelAnimationFrame() {
void SMILTimeContainer::scheduleWakeUp(
double delayTime,
FrameSchedulingState frameSchedulingState) {
- ASSERT(frameSchedulingState == SynchronizeAnimations ||
+ DCHECK(frameSchedulingState == SynchronizeAnimations ||
frameSchedulingState == FutureAnimationFrame);
m_wakeupTimer.startOneShot(delayTime, BLINK_FROM_HERE);
m_frameSchedulingState = frameSchedulingState;
}
void SMILTimeContainer::wakeupTimerFired(TimerBase*) {
- ASSERT(m_frameSchedulingState == SynchronizeAnimations ||
+ DCHECK(m_frameSchedulingState == SynchronizeAnimations ||
m_frameSchedulingState == FutureAnimationFrame);
if (m_frameSchedulingState == FutureAnimationFrame) {
- ASSERT(isTimelineRunning());
+ DCHECK(isTimelineRunning());
m_frameSchedulingState = Idle;
serviceOnNextFrame();
} else {
@@ -419,7 +419,7 @@ void SMILTimeContainer::updateAnimationsAndScheduleFrameIfNeeded(
}
SMILTime SMILTimeContainer::updateAnimations(double elapsed, bool seekToTime) {
- ASSERT(document().isActive());
+ DCHECK(document().isActive());
SMILTime earliestFireTime = SMILTime::unresolved();
#if DCHECK_IS_ON()
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('k') | third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698