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

Unified Diff: third_party/WebKit/Source/core/svg/SVGDocumentExtensions.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/SVGDocumentExtensions.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
index b859e892ef174ebdaaf23cf4f4f3f42b9b5cf099..2cbe54372f6899c9b4b34ba6b9587a0309682ebe 100644
--- a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
@@ -45,7 +45,7 @@ void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) {
void SVGDocumentExtensions::addWebAnimationsPendingSVGElement(
SVGElement& element) {
- ASSERT(RuntimeEnabledFeatures::webAnimationsSVGEnabled());
+ DCHECK(RuntimeEnabledFeatures::webAnimationsSVGEnabled());
m_webAnimationsPendingSVGElements.insert(&element);
}
@@ -72,7 +72,7 @@ void SVGDocumentExtensions::serviceAnimations() {
for (auto& svgElement : webAnimationsPendingSVGElements)
svgElement->applyActiveWebAnimations();
- ASSERT(m_webAnimationsPendingSVGElements.isEmpty());
+ DCHECK(m_webAnimationsPendingSVGElements.isEmpty());
}
void SVGDocumentExtensions::startAnimations() {
@@ -114,13 +114,17 @@ void SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements() {
void SVGDocumentExtensions::addSVGRootWithRelativeLengthDescendents(
SVGSVGElement* svgRoot) {
- ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
+#if DCHECK_IS_ON()
+ DCHECK(!m_inRelativeLengthSVGRootsInvalidation);
+#endif
m_relativeLengthSVGRoots.insert(svgRoot);
}
void SVGDocumentExtensions::removeSVGRootWithRelativeLengthDescendents(
SVGSVGElement* svgRoot) {
- ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
+#if DCHECK_IS_ON()
+ DCHECK(!m_inRelativeLengthSVGRootsInvalidation);
+#endif
m_relativeLengthSVGRoots.erase(svgRoot);
}
@@ -131,8 +135,8 @@ bool SVGDocumentExtensions::isSVGRootWithRelativeLengthDescendents(
void SVGDocumentExtensions::invalidateSVGRootsWithRelativeLengthDescendents(
SubtreeLayoutScope* scope) {
- ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
#if DCHECK_IS_ON()
+ DCHECK(!m_inRelativeLengthSVGRootsInvalidation);
AutoReset<bool> inRelativeLengthSVGRootsChange(
&m_inRelativeLengthSVGRootsInvalidation, true);
#endif
@@ -165,7 +169,7 @@ SVGSVGElement* SVGDocumentExtensions::rootElement(const Document& document) {
}
SVGSVGElement* SVGDocumentExtensions::rootElement() const {
- ASSERT(m_document);
+ DCHECK(m_document);
return rootElement(*m_document);
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGDiscardElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698