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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased after ENABLE(ASSERT) renaming. Created 6 years, 5 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: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index f6179ab14acb57c877d5b07d96535eb07b13a808..0cba776f9efb8151f424e2f58bfe54a0ef578263 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -906,7 +906,7 @@ void RenderBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layou
LayoutUnit RenderBox::minPreferredLogicalWidth() const
{
if (preferredLogicalWidthsDirty()) {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&>(*this));
#endif
const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
@@ -918,7 +918,7 @@ LayoutUnit RenderBox::minPreferredLogicalWidth() const
LayoutUnit RenderBox::maxPreferredLogicalWidth() const
{
if (preferredLogicalWidthsDirty()) {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&>(*this));
#endif
const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
@@ -2079,7 +2079,7 @@ void RenderBox::updateLogicalWidth()
static float getMaxWidthListMarker(const RenderBox* renderer)
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(renderer);
Node* parentNode = renderer->generatingNode();
ASSERT(parentNode);

Powered by Google App Engine
This is Rietveld 408576698