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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.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/shadow/ElementShadow.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
index 24a59a26a231d05521be29f23b132c306ca9026b..bb10711250746792a79d2b2f2b25611bb3249332 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
@@ -188,7 +188,7 @@ void ElementShadow::removeDetachedShadowRoots()
{
// Dont protect this ref count.
Element* shadowHost = host();
- ASSERT(shadowHost);
+ DCHECK(shadowHost);
while (RawPtr<ShadowRoot> oldRoot = m_shadowRoots.head()) {
InspectorInstrumentation::willPopShadowRoot(shadowHost, oldRoot.get());
@@ -258,7 +258,10 @@ bool ElementShadow::hasSameStyles(const ElementShadow* other) const
const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Node* key) const
{
- ASSERT(key && !key->needsDistributionRecalc());
+ DCHECK(key);
+#if DCHECK_IS_ON()
+ DCHECK(!key->needsDistributionRecalc());
+#endif
NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoints.find(key);
#if ENABLE(OILPAN)
return it == m_nodeToInsertionPoints.end() ? nullptr : it->value->last().get();
@@ -269,7 +272,10 @@ const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Nod
const DestinationInsertionPoints* ElementShadow::destinationInsertionPointsFor(const Node* key) const
{
- ASSERT(key && !key->needsDistributionRecalc());
+ DCHECK(key);
+#if DCHECK_IS_ON()
+ DCHECK(!key->needsDistributionRecalc());
+#endif
NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoints.find(key);
#if ENABLE(OILPAN)
return it == m_nodeToInsertionPoints.end() ? nullptr : it->value.get();
@@ -299,7 +305,7 @@ void ElementShadow::distributeV0()
if (!point->isActive())
continue;
if (isHTMLShadowElement(*point)) {
- ASSERT(!shadowInsertionPoint);
+ DCHECK(!shadowInsertionPoint);
shadowInsertionPoint = toHTMLShadowElement(point);
shadowInsertionPoints.append(shadowInsertionPoint);
} else {
@@ -313,7 +319,7 @@ void ElementShadow::distributeV0()
for (size_t i = shadowInsertionPoints.size(); i > 0; --i) {
HTMLShadowElement* shadowInsertionPoint = shadowInsertionPoints[i - 1];
ShadowRoot* root = shadowInsertionPoint->containingShadowRoot();
- ASSERT(root);
+ DCHECK(root);
if (root->isOldest()) {
pool.distributeTo(shadowInsertionPoint, this);
} else if (root->olderShadowRoot()->type() == root->type()) {

Powered by Google App Engine
This is Rietveld 408576698