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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. 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/StylePropertySet.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
index 0c5662fde1d1914f9de1eeeea22a8ff9989e03ad..5e990e3e9b26a7d02d0ccf193e3bf708eec90fa5 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
@@ -53,7 +53,7 @@ ImmutableStylePropertySet* ImmutableStylePropertySet::create(
const CSSProperty* properties,
unsigned count,
CSSParserMode cssParserMode) {
- ASSERT(count <= MaxArraySize);
+ DCHECK_LE(count, static_cast<unsigned>(MaxArraySize));
void* slot = ThreadHeap::allocate<StylePropertySet>(
sizeForImmutableStylePropertySetWithPropertyCount(count));
return new (slot) ImmutableStylePropertySet(properties, count, cssParserMode);
@@ -110,10 +110,10 @@ static bool isPropertyMatch(const StylePropertyMetadata& metadata,
const CSSValue&,
uint16_t id,
CSSPropertyID propertyID) {
- ASSERT(id == propertyID);
+ DCHECK_EQ(id, propertyID);
bool result = metadata.m_propertyID == id;
// Only enabled properties should be part of the style.
- ASSERT(!result || CSSPropertyMetadata::isEnabledProperty(propertyID));
+ DCHECK(!result || CSSPropertyMetadata::isEnabledProperty(propertyID));
return result;
}
@@ -121,7 +121,7 @@ static bool isPropertyMatch(const StylePropertyMetadata& metadata,
const CSSValue& value,
uint16_t id,
const AtomicString& customPropertyName) {
- ASSERT(id == CSSPropertyVariable);
+ DCHECK_EQ(id, CSSPropertyVariable);
return metadata.m_propertyID == id &&
toCSSCustomPropertyDeclaration(value).name() == customPropertyName;
}
@@ -486,7 +486,7 @@ CSSProperty* MutableStylePropertySet::findCSSPropertyWithID(
// customPropertyName here.
foundPropertyIndex = findPropertyIndex(customPropertyName);
} else {
- ASSERT(customPropertyName.isNull());
+ DCHECK(customPropertyName.isNull());
foundPropertyIndex = findPropertyIndex(propertyID);
}
if (foundPropertyIndex == -1)
@@ -550,9 +550,9 @@ CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration() {
// FIXME: get rid of this weirdness of a CSSStyleDeclaration inside of a
// style property set.
if (m_cssomWrapper) {
- ASSERT(
+ DCHECK(
!static_cast<CSSStyleDeclaration*>(m_cssomWrapper.get())->parentRule());
- ASSERT(!m_cssomWrapper->parentElement());
+ DCHECK(!m_cssomWrapper->parentElement());
return m_cssomWrapper.get();
}
m_cssomWrapper = new PropertySetCSSStyleDeclaration(*this);
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleMedia.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698