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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2553653003: Make ifdefs consistent in WebKit/Source/core/layout/ . (Closed)
Patch Set: Update after review. Created 4 years 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 6f2be648af1c9c31e1949941a6ffbec4a62d1e49..a6ee6006cba547db9603195ce9e78c00a276c1f2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -236,7 +236,9 @@ LayoutObject::LayoutObject(Node* node)
}
LayoutObject::~LayoutObject() {
- ASSERT(!m_hasAXObject);
+#if DCHECK_IS_ON()
+ DCHECK(!m_hasAXObject);
+#endif
InstanceCounters::decrementCounter(InstanceCounters::LayoutObjectCounter);
}
@@ -737,7 +739,9 @@ static inline bool objectIsRelayoutBoundary(const LayoutObject* object) {
void LayoutObject::markContainerChainForLayout(bool scheduleRelayout,
SubtreeLayoutScope* layouter) {
- ASSERT(!isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!isSetNeedsLayoutForbidden());
+#endif
ASSERT(!layouter || this != layouter->root());
// When we're in layout, we're marking a descendant as needing layout with
// the intention of visiting it during this layout. We shouldn't be
@@ -768,18 +772,18 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout,
container = object->container();
object->setPosChildNeedsLayout(true);
simplifiedNormalFlowLayout = true;
- ASSERT(!object->isSetNeedsLayoutForbidden());
} else if (simplifiedNormalFlowLayout) {
if (object->needsSimplifiedNormalFlowLayout())
return;
object->setNeedsSimplifiedNormalFlowLayout(true);
- ASSERT(!object->isSetNeedsLayoutForbidden());
} else {
if (object->normalChildNeedsLayout())
return;
object->setNormalChildNeedsLayout(true);
- ASSERT(!object->isSetNeedsLayoutForbidden());
}
+#if DCHECK_IS_ON()
+ DCHECK(!object->isSetNeedsLayoutForbidden());
+#endif
if (layouter) {
layouter->recordObjectMarkedForLayout(object);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698