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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp

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/custom/CustomElementRegistrationContext.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp
index c1b57986aa8ba53fa132bb00520c1da4db4e0d47..76fe4a045f6e4ae6f3fcfa36ee08950039167f25 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp
@@ -68,7 +68,7 @@ void CustomElementRegistrationContext::registerElement(Document* document, Custo
RawPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document& document, const QualifiedName& tagName)
{
- ASSERT(CustomElement::isValidName(tagName.localName()));
+ DCHECK(CustomElement::isValidName(tagName.localName()));
RawPtr<Element> element;
@@ -98,10 +98,10 @@ void CustomElementRegistrationContext::resolveOrScheduleResolution(Element* elem
const AtomicString& type = CustomElement::isValidName(element->localName())
? element->localName()
: typeExtension;
- ASSERT(!type.isNull());
+ DCHECK(!type.isNull());
CustomElementDescriptor descriptor(type, element->namespaceURI(), element->localName());
- ASSERT(element->getCustomElementState() == Element::WaitingForUpgrade);
+ DCHECK_EQ(element->getCustomElementState(), Element::WaitingForUpgrade);
CustomElementScheduler::resolveOrScheduleResolution(this, element, descriptor);
}
@@ -112,15 +112,15 @@ void CustomElementRegistrationContext::resolve(Element* element, const CustomEle
if (definition) {
CustomElement::define(element, definition);
} else {
- ASSERT(element->getCustomElementState() == Element::WaitingForUpgrade);
+ DCHECK_EQ(element->getCustomElementState(), Element::WaitingForUpgrade);
m_candidates->add(descriptor, element);
}
}
void CustomElementRegistrationContext::setIsAttributeAndTypeExtension(Element* element, const AtomicString& type)
{
- ASSERT(element);
- ASSERT(!type.isEmpty());
+ DCHECK(element);
+ DCHECK(!type.isEmpty());
element->setAttribute(HTMLNames::isAttr, type);
setTypeExtension(element, type);
}
@@ -144,7 +144,7 @@ void CustomElementRegistrationContext::setTypeExtension(Element* element, const
}
// Custom tags take precedence over type extensions
- ASSERT(!CustomElement::isValidName(element->localName()));
+ DCHECK(!CustomElement::isValidName(element->localName()));
if (!CustomElement::isValidName(type))
return;

Powered by Google App Engine
This is Rietveld 408576698