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

Unified Diff: third_party/WebKit/Source/core/dom/Text.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/Text.cpp
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
index e95cff6180a3ea9e58f2908142d03a426ebfa453..96f32aca6859248e91afba854fed18dcdcadc6e3 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -184,7 +184,7 @@ String Text::wholeText() const
continue;
result.append(toText(n)->data());
}
- ASSERT(result.length() == resultLength);
+ DCHECK_EQ(result.length(), resultLength);
return result.toString();
}
@@ -326,7 +326,7 @@ bool Text::textLayoutObjectIsNeeded(const ComputedStyle& style, const LayoutObje
static bool isSVGText(Text* text)
{
Node* parentOrShadowHostNode = text->parentOrShadowHostNode();
- ASSERT(parentOrShadowHostNode);
+ DCHECK(parentOrShadowHostNode);
return parentOrShadowHostNode->isSVGElement() && !isSVGForeignObjectElement(*parentOrShadowHostNode);
}
@@ -397,7 +397,7 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling)
// need to create one if the parent style now has white-space: pre.
bool Text::needsWhitespaceLayoutObject()
{
- ASSERT(!layoutObject());
+ DCHECK(!layoutObject());
if (const ComputedStyle* style = parentComputedStyle())
return style->preserveNewline();
return false;
@@ -407,7 +407,7 @@ bool Text::needsWhitespaceLayoutObject()
// |Node::layoutObject()| are discouraged.
static bool shouldUpdateLayoutByReattaching(const Text& textNode, LayoutText* textLayoutObject)
{
- ASSERT(textNode.layoutObject() == textLayoutObject);
+ DCHECK_EQ(textNode.layoutObject(), textLayoutObject);
if (!textLayoutObject)
return true;
if (!textNode.textLayoutObjectIsNeeded(*textLayoutObject->style(), *textLayoutObject->parent()))
« no previous file with comments | « third_party/WebKit/Source/core/dom/TagCollection.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698