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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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/dom/shadow/ShadowRootRareData.h
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h b/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h
index b92e81a39d3696dfef8b3b573e8082c211e5ea83..e6f1bf784ddf6a05f48795e1c2c612029fc2a578 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h
@@ -60,7 +60,7 @@ public:
unsigned descendantShadowElementCount() const { return m_descendantShadowElementCount; }
void didAddChildShadowRoot() { ++m_childShadowRootCount; }
- void didRemoveChildShadowRoot() { ASSERT(m_childShadowRootCount > 0); --m_childShadowRootCount; }
+ void didRemoveChildShadowRoot() { DCHECK_GT(m_childShadowRootCount, 0u); --m_childShadowRootCount; }
unsigned childShadowRootCount() const { return m_childShadowRootCount; }
@@ -72,7 +72,7 @@ public:
void setStyleSheets(RawPtr<StyleSheetList> styleSheetList) { m_styleSheetList = styleSheetList; }
void didAddSlot() { ++m_descendantSlotCount; }
- void didRemoveSlot() { ASSERT(m_descendantSlotCount >= 1); --m_descendantSlotCount; }
+ void didRemoveSlot() { DCHECK_GT(m_descendantSlotCount, 0u); --m_descendantSlotCount; }
unsigned descendantSlotCount() const { return m_descendantSlotCount; }
@@ -102,7 +102,7 @@ private:
inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
{
- ASSERT(point);
+ DCHECK(point);
if (isHTMLShadowElement(*point))
++m_descendantShadowElementCount;
else if (isHTMLContentElement(*point))
@@ -113,12 +113,12 @@ inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point)
{
- ASSERT(point);
+ DCHECK(point);
if (isHTMLShadowElement(*point)) {
- ASSERT(m_descendantShadowElementCount > 0);
+ DCHECK_GT(m_descendantShadowElementCount, 0u);
--m_descendantShadowElementCount;
} else if (isHTMLContentElement(*point)) {
- ASSERT(m_descendantContentElementCount > 0);
+ DCHECK_GT(m_descendantContentElementCount, 0u);
--m_descendantContentElementCount;
} else {
ASSERT_NOT_REACHED();
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698