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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest 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/layout/svg/SVGResourcesCache.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp
index 3a0bd64a3d3ee20b4d7f012245a70cca3b65c357..e5bb52b6118305897e20d2e85c574622cb33b9d0 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp
@@ -35,8 +35,8 @@ SVGResourcesCache::~SVGResourcesCache() {}
void SVGResourcesCache::addResourcesFromLayoutObject(
LayoutObject* object,
const ComputedStyle& style) {
- ASSERT(object);
- ASSERT(!m_cache.contains(object));
+ DCHECK(object);
+ DCHECK(!m_cache.contains(object));
// Build a list of all resources associated with the passed LayoutObject.
std::unique_ptr<SVGResources> newResources =
@@ -80,7 +80,7 @@ static inline SVGResourcesCache& resourcesCache(Document& document) {
SVGResources* SVGResourcesCache::cachedResourcesForLayoutObject(
const LayoutObject* layoutObject) {
- ASSERT(layoutObject);
+ DCHECK(layoutObject);
return resourcesCache(layoutObject->document()).m_cache.at(layoutObject);
}
@@ -96,7 +96,7 @@ void SVGResourcesCache::clientLayoutChanged(LayoutObject* object) {
}
static inline bool layoutObjectCanHaveResources(LayoutObject* layoutObject) {
- ASSERT(layoutObject);
+ DCHECK(layoutObject);
return layoutObject->node() && layoutObject->node()->isSVGElement() &&
!layoutObject->isSVGInlineText();
}
@@ -115,9 +115,9 @@ static inline bool isLayoutObjectOfResourceContainer(LayoutObject* layoutObject)
void SVGResourcesCache::clientStyleChanged(LayoutObject* layoutObject,
StyleDifference diff,
const ComputedStyle& newStyle) {
- ASSERT(layoutObject);
- ASSERT(layoutObject->node());
- ASSERT(layoutObject->node()->isSVGElement());
+ DCHECK(layoutObject);
+ DCHECK(layoutObject->node());
+ DCHECK(layoutObject->node()->isSVGElement());
if (!diff.hasDifference() || !layoutObject->parent())
return;
@@ -176,7 +176,7 @@ void SVGResourcesCache::clientWillBeRemovedFromTree(
}
void SVGResourcesCache::clientDestroyed(LayoutObject* layoutObject) {
- ASSERT(layoutObject);
+ DCHECK(layoutObject);
SVGResources* resources = cachedResourcesForLayoutObject(layoutObject);
if (resources)

Powered by Google App Engine
This is Rietveld 408576698