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

Unified Diff: third_party/WebKit/Source/core/css/RuleFeature.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/RuleFeature.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.cpp b/third_party/WebKit/Source/core/css/RuleFeature.cpp
index 7dd11cbaeabf0c464061d94fd86f83f597d98120..5cd2922993db1c68d2b399bcab0bd8a754ba6822 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -248,7 +248,7 @@ InvalidationSet& ensureInvalidationSet(
void extractInvalidationSets(InvalidationSet* invalidationSet,
DescendantInvalidationSet*& descendants,
SiblingInvalidationSet*& siblings) {
- RELEASE_ASSERT(invalidationSet->isAlive());
+ CHECK(invalidationSet->isAlive());
if (invalidationSet->type() == InvalidateDescendants) {
descendants = toDescendantInvalidationSet(invalidationSet);
siblings = nullptr;
@@ -275,7 +275,7 @@ DEFINE_TRACE(RuleFeature) {
RuleFeatureSet::RuleFeatureSet() : m_isAlive(true) {}
RuleFeatureSet::~RuleFeatureSet() {
- RELEASE_ASSERT(m_isAlive);
+ CHECK(m_isAlive);
m_metadata.clear();
m_classInvalidationSets.clear();
@@ -291,14 +291,14 @@ RuleFeatureSet::~RuleFeatureSet() {
ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensureClassInvalidationSet(
const AtomicString& className,
InvalidationType type) {
- RELEASE_ASSERT(!className.isEmpty());
+ CHECK(!className.isEmpty());
return ensureInvalidationSet(m_classInvalidationSets, className, type);
}
ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensureAttributeInvalidationSet(
const AtomicString& attributeName,
InvalidationType type) {
- RELEASE_ASSERT(!attributeName.isEmpty());
+ CHECK(!attributeName.isEmpty());
return ensureInvalidationSet(m_attributeInvalidationSets, attributeName,
type);
}
@@ -306,14 +306,14 @@ ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensureAttributeInvalidationSet(
ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensureIdInvalidationSet(
const AtomicString& id,
InvalidationType type) {
- RELEASE_ASSERT(!id.isEmpty());
+ CHECK(!id.isEmpty());
return ensureInvalidationSet(m_idInvalidationSets, id, type);
}
ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensurePseudoInvalidationSet(
CSSSelector::PseudoType pseudoType,
InvalidationType type) {
- RELEASE_ASSERT(pseudoType != CSSSelector::PseudoUnknown);
+ CHECK(pseudoType != CSSSelector::PseudoUnknown);
tkent 2017/03/28 14:44:56 Use CHECK_NE
nikhil.sahni 2017/03/30 12:17:58 Done.
return ensureInvalidationSet(m_pseudoInvalidationSets, pseudoType, type);
}
@@ -802,7 +802,7 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(
RuleFeatureSet::SelectorPreMatch RuleFeatureSet::collectFeaturesFromRuleData(
const RuleData& ruleData) {
- RELEASE_ASSERT(m_isAlive);
+ CHECK(m_isAlive);
FeatureMetadata metadata;
if (collectFeaturesFromSelector(ruleData.selector(), metadata) ==
SelectorNeverMatches)
@@ -919,9 +919,9 @@ void RuleFeatureSet::FeatureMetadata::clear() {
}
void RuleFeatureSet::add(const RuleFeatureSet& other) {
- RELEASE_ASSERT(m_isAlive);
- RELEASE_ASSERT(other.m_isAlive);
- RELEASE_ASSERT(&other != this);
+ CHECK(m_isAlive);
+ CHECK(other.m_isAlive);
+ CHECK_NE(&other, this);
for (const auto& entry : other.m_classInvalidationSets)
ensureInvalidationSet(m_classInvalidationSets, entry.key,
entry.value->type())
@@ -955,7 +955,7 @@ void RuleFeatureSet::add(const RuleFeatureSet& other) {
}
void RuleFeatureSet::clear() {
- RELEASE_ASSERT(m_isAlive);
+ CHECK(m_isAlive);
m_siblingRules.clear();
m_uncommonAttributeRules.clear();
m_metadata.clear();

Powered by Google App Engine
This is Rietveld 408576698