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

Unified Diff: third_party/WebKit/Source/core/css/CSSGroupingRule.cpp

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: Worked on Review Comments done 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/css/CSSGroupingRule.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp b/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp
index 258cfe3a9814889f9e03b7019bcb8d606c548621..f2eedd11405bfd595563caa6cb62b8a7e6d5362e 100644
--- a/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp
+++ b/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp
@@ -51,7 +51,7 @@ CSSGroupingRule::~CSSGroupingRule() {}
unsigned CSSGroupingRule::insertRule(const String& ruleString,
unsigned index,
ExceptionState& exceptionState) {
- ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
+ DCHECK_EQ(m_childRuleCSSOMWrappers.size(), m_groupRule->childRules().size());
if (index > m_groupRule->childRules().size()) {
exceptionState.throwDOMException(
@@ -99,7 +99,7 @@ unsigned CSSGroupingRule::insertRule(const String& ruleString,
void CSSGroupingRule::deleteRule(unsigned index,
ExceptionState& exceptionState) {
- ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
+ DCHECK_EQ(m_childRuleCSSOMWrappers.size(), m_groupRule->childRules().size());
if (index >= m_groupRule->childRules().size()) {
exceptionState.throwDOMException(
@@ -133,7 +133,7 @@ unsigned CSSGroupingRule::length() const {
CSSRule* CSSGroupingRule::item(unsigned index) const {
if (index >= length())
return nullptr;
- ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
+ DCHECK_EQ(m_childRuleCSSOMWrappers.size(), m_groupRule->childRules().size());
Member<CSSRule>& rule = m_childRuleCSSOMWrappers[index];
if (!rule)
rule = m_groupRule->childRules()[index]->createCSSOMWrapper(
@@ -149,7 +149,7 @@ CSSRuleList* CSSGroupingRule::cssRules() const {
}
void CSSGroupingRule::reattach(StyleRuleBase* rule) {
- ASSERT(rule);
+ DCHECK(rule);
m_groupRule = static_cast<StyleRuleGroup*>(rule);
for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) {
if (m_childRuleCSSOMWrappers[i])

Powered by Google App Engine
This is Rietveld 408576698