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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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/html/HTMLDetailsElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
index bc329ff6f68854d3a218511215cc37f15f272061..44b8c76a9d12beb8d324a2b63f5087dd4e2cdf21 100644
--- a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
@@ -97,7 +97,7 @@ HTMLDetailsElement::~HTMLDetailsElement()
void HTMLDetailsElement::dispatchPendingEvent(DetailsEventSender* eventSender)
{
- ASSERT_UNUSED(eventSender, eventSender == &detailsToggleEventSender());
+ DCHECK_EQ(eventSender, &detailsToggleEventSender());
dispatchEvent(Event::create(EventTypeNames::toggle));
}
@@ -130,7 +130,8 @@ Element* HTMLDetailsElement::findMainSummary() const
return summary;
HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->firstChild());
- ASSERT(content->firstChild() && isHTMLSummaryElement(*content->firstChild()));
+ DCHECK(content->firstChild());
+ DCHECK(isHTMLSummaryElement(*content->firstChild()));
return toElement(content->firstChild());
}
@@ -147,7 +148,7 @@ void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
detailsToggleEventSender().dispatchEventSoon(this);
Element* content = ensureUserAgentShadowRoot().getElementById(ShadowElementNames::detailsContent());
- ASSERT(content);
+ DCHECK(content);
if (m_isOpen)
content->removeInlineStyleProperty(CSSPropertyDisplay);
else
@@ -156,7 +157,7 @@ void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
// Invalidate the LayoutDetailsMarker in order to turn the arrow signifying if the
// details element is open or closed.
Element* summary = findMainSummary();
- ASSERT(summary);
+ DCHECK(summary);
Element* control = toHTMLSummaryElement(summary)->markerControl();
if (control && control->layoutObject())

Powered by Google App Engine
This is Rietveld 408576698