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

Unified Diff: third_party/WebKit/Source/core/dom/PseudoElement.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/PseudoElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/PseudoElement.cpp b/third_party/WebKit/Source/core/dom/PseudoElement.cpp
index ff405551a0c4b992e582d3768a633fbb03d5ca51..bcd1e668a7ea0370220471a12fa4ebfbcefd2e97 100644
--- a/third_party/WebKit/Source/core/dom/PseudoElement.cpp
+++ b/third_party/WebKit/Source/core/dom/PseudoElement.cpp
@@ -85,7 +85,7 @@ PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId)
: Element(pseudoElementTagName(pseudoId), &parent->document(), CreateElement)
, m_pseudoId(pseudoId)
{
- ASSERT(pseudoId != PseudoIdNone);
+ DCHECK_NE(pseudoId, PseudoIdNone);
parent->treeScope().adoptIfNeeded(*this);
setParentOrShadowHostNode(parent);
setHasCustomStyleCallbacks();
@@ -100,12 +100,12 @@ PassRefPtr<ComputedStyle> PseudoElement::customStyleForLayoutObject()
void PseudoElement::dispose()
{
- ASSERT(parentOrShadowHostElement());
+ DCHECK(parentOrShadowHostElement());
InspectorInstrumentation::pseudoElementDestroyed(this);
- ASSERT(!nextSibling());
- ASSERT(!previousSibling());
+ DCHECK(!nextSibling());
+ DCHECK(!previousSibling());
detach();
RawPtr<Element> parent = parentOrShadowHostElement();
@@ -116,7 +116,7 @@ void PseudoElement::dispose()
void PseudoElement::attach(const AttachContext& context)
{
- ASSERT(!layoutObject());
+ DCHECK(!layoutObject());
Element::attach(context);
@@ -127,7 +127,7 @@ void PseudoElement::attach(const AttachContext& context)
ComputedStyle& style = layoutObject->mutableStyleRef();
if (style.styleType() != PseudoIdBefore && style.styleType() != PseudoIdAfter)
return;
- ASSERT(style.contentData());
+ DCHECK(style.contentData());
for (const ContentData* content = style.contentData(); content; content = content->next()) {
LayoutObject* child = content->createLayoutObject(document(), style);
@@ -180,14 +180,14 @@ Node* PseudoElement::findAssociatedNode() const
if (getPseudoId() == PseudoIdBackdrop)
return parentOrShadowHostNode();
- ASSERT(layoutObject());
- ASSERT(layoutObject()->parent());
+ DCHECK(layoutObject());
+ DCHECK(layoutObject()->parent());
// We can have any number of anonymous layout objects inserted between
// us and our parent so make sure we skip over them.
LayoutObject* ancestor = layoutObject()->parent();
while (ancestor->isAnonymous() || (ancestor->node() && ancestor->node()->isPseudoElement())) {
- ASSERT(ancestor->parent());
+ DCHECK(ancestor->parent());
ancestor = ancestor->parent();
}
return ancestor->node();
« no previous file with comments | « third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp ('k') | third_party/WebKit/Source/core/dom/QualifiedName.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698