Title: [151164] trunk/Source/WebCore
Revision
151164
Author
kangil....@samsung.com
Date
2013-06-04 03:26:51 -0700 (Tue, 04 Jun 2013)

Log Message

Use ASSERT_DISABLED option for assertion purpose code in InlineBox
https://bugs.webkit.org/show_bug.cgi?id=117146

Reviewed by Alexey Proskuryakov.

We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::~InlineBox):
(WebCore::InlineBox::destroy):
(WebCore::InlineBox::operator delete):
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151163 => 151164)


--- trunk/Source/WebCore/ChangeLog	2013-06-04 09:49:06 UTC (rev 151163)
+++ trunk/Source/WebCore/ChangeLog	2013-06-04 10:26:51 UTC (rev 151164)
@@ -1,3 +1,19 @@
+2013-06-04  Kangil Han  <kangil....@samsung.com>
+
+        Use ASSERT_DISABLED option for assertion purpose code in InlineBox
+        https://bugs.webkit.org/show_bug.cgi?id=117146
+
+        Reviewed by Alexey Proskuryakov.
+
+        We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
+
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::~InlineBox):
+        (WebCore::InlineBox::destroy):
+        (WebCore::InlineBox::operator delete):
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::InlineBox):
+
 2013-06-04  Kent Tamura  <tk...@chromium.org>
 
         Fix an assertion failure in Range::textNodeSplit by Text::splitText

Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (151163 => 151164)


--- trunk/Source/WebCore/rendering/InlineBox.cpp	2013-06-04 09:49:06 UTC (rev 151163)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2013-06-04 10:26:51 UTC (rev 151164)
@@ -44,25 +44,23 @@
     FloatPoint b;
     float c;
     uint32_t d : 32;
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
     bool f;
 #endif
 };
 
 COMPILE_ASSERT(sizeof(InlineBox) == sizeof(SameSizeAsInlineBox), InlineBox_size_guard);
 
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
 static bool inInlineBoxDetach;
 #endif
 
-#ifndef NDEBUG
-
+#if !ASSERT_DISABLED
 InlineBox::~InlineBox()
 {
     if (!m_hasBadParent && m_parent)
         m_parent->setHasBadChildList();
 }
-
 #endif
 
 void InlineBox::remove()
@@ -73,11 +71,11 @@
 
 void InlineBox::destroy(RenderArena* renderArena)
 {
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
     inInlineBoxDetach = true;
 #endif
     delete this;
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
     inInlineBoxDetach = false;
 #endif
 
@@ -93,7 +91,6 @@
 void InlineBox::operator delete(void* ptr, size_t sz)
 {
     ASSERT(inInlineBoxDetach);
-
     // Stash size where destroy can find it.
     *(size_t *)ptr = sz;
 }

Modified: trunk/Source/WebCore/rendering/InlineBox.h (151163 => 151164)


--- trunk/Source/WebCore/rendering/InlineBox.h	2013-06-04 09:49:06 UTC (rev 151163)
+++ trunk/Source/WebCore/rendering/InlineBox.h	2013-06-04 10:26:51 UTC (rev 151164)
@@ -40,7 +40,7 @@
         , m_parent(0)
         , m_renderer(obj)
         , m_logicalWidth(0)
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
         , m_hasBadParent(false)
 #endif
     {
@@ -55,7 +55,7 @@
         , m_topLeft(topLeft)
         , m_logicalWidth(logicalWidth)
         , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal)
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
         , m_hasBadParent(false)
 #endif
     {
@@ -272,7 +272,7 @@
     // visibleLeftEdge, visibleRightEdge are in the parent's coordinate system.
     virtual float placeEllipsisBox(bool ltr, float visibleLeftEdge, float visibleRightEdge, float ellipsisWidth, float &truncatedWidth, bool&);
 
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
     void setHasBadParent();
 #endif
 
@@ -415,19 +415,19 @@
     // For InlineFlowBox and InlineTextBox
     bool extracted() const { return m_bitfields.extracted(); }
 
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
 private:
     bool m_hasBadParent;
 #endif
 };
 
-#ifdef NDEBUG
+#if ASSERT_DISABLED
 inline InlineBox::~InlineBox()
 {
 }
 #endif
 
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
 inline void InlineBox::setHasBadParent()
 {
     m_hasBadParent = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to