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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.h ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SMILTimeContainer.cpp
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp
index be1fb7e3e23341655a5e746537407e88d7503346..ba7ad77389c5b0af0bb18825c4bf9ec8bedfb361 100644
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -59,7 +59,7 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner)
, m_documentOrderIndexesDirty(false)
, m_wakeupTimer(this, &SMILTimeContainer::wakeupTimerFired)
, m_ownerSVGElement(owner)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_preventScheduledAnimationsChanges(false)
#endif
{
@@ -69,7 +69,7 @@ SMILTimeContainer::~SMILTimeContainer()
{
cancelAnimationFrame();
ASSERT(!m_wakeupTimer.isActive());
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!m_preventScheduledAnimationsChanges);
#endif
}
@@ -80,7 +80,7 @@ void SMILTimeContainer::schedule(SVGSMILElement* animation, SVGElement* target,
ASSERT(target);
ASSERT(animation->hasValidAttributeName());
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!m_preventScheduledAnimationsChanges);
#endif
@@ -100,7 +100,7 @@ void SMILTimeContainer::unschedule(SVGSMILElement* animation, SVGElement* target
{
ASSERT(animation->timeContainer() == this);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!m_preventScheduledAnimationsChanges);
#endif
@@ -233,7 +233,7 @@ void SMILTimeContainer::setElapsed(SMILTime time)
m_accumulatedActiveTime = 0;
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_preventScheduledAnimationsChanges = true;
#endif
GroupedAnimationsMap::iterator end = m_scheduledAnimations.end();
@@ -245,7 +245,7 @@ void SMILTimeContainer::setElapsed(SMILTime time)
for (AnimationsLinkedHashSet::const_iterator itAnimation = scheduled->begin(), itAnimationEnd = scheduled->end(); itAnimation != itAnimationEnd; ++itAnimation)
(*itAnimation)->reset();
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_preventScheduledAnimationsChanges = false;
#endif
@@ -372,7 +372,7 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
{
SMILTime earliestFireTime = SMILTime::unresolved();
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
// This boolean will catch any attempts to schedule/unschedule scheduledAnimations during this critical section.
// Similarly, any elements removed will unschedule themselves, so this will catch modification of animationsToApply.
m_preventScheduledAnimationsChanges = true;
@@ -433,7 +433,7 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
unsigned animationsToApplySize = animationsToApply.size();
if (!animationsToApplySize) {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_preventScheduledAnimationsChanges = false;
#endif
return earliestFireTime;
@@ -443,7 +443,7 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
for (unsigned i = 0; i < animationsToApplySize; ++i)
animationsToApply[i]->applyResultsToTarget();
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_preventScheduledAnimationsChanges = false;
#endif
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.h ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698