Changeset 151164 in webkit


Ignore:
Timestamp:
Jun 4, 2013 3:26:51 AM (11 years ago)
Author:
kangil.han@samsung.com
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151160 r151164  
     12013-06-04  Kangil Han  <kangil.han@samsung.com>
     2
     3        Use ASSERT_DISABLED option for assertion purpose code in InlineBox
     4        https://bugs.webkit.org/show_bug.cgi?id=117146
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
     9
     10        * rendering/InlineBox.cpp:
     11        (WebCore::InlineBox::~InlineBox):
     12        (WebCore::InlineBox::destroy):
     13        (WebCore::InlineBox::operator delete):
     14        * rendering/InlineBox.h:
     15        (WebCore::InlineBox::InlineBox):
     16
    1172013-06-04  Kent Tamura  <tkent@chromium.org>
    218
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r148921 r151164  
    4545    float c;
    4646    uint32_t d : 32;
    47 #ifndef NDEBUG
     47#if !ASSERT_DISABLED
    4848    bool f;
    4949#endif
     
    5252COMPILE_ASSERT(sizeof(InlineBox) == sizeof(SameSizeAsInlineBox), InlineBox_size_guard);
    5353
    54 #ifndef NDEBUG
     54#if !ASSERT_DISABLED
    5555static bool inInlineBoxDetach;
    5656#endif
    5757
    58 #ifndef NDEBUG
    59 
     58#if !ASSERT_DISABLED
    6059InlineBox::~InlineBox()
    6160{
     
    6362        m_parent->setHasBadChildList();
    6463}
    65 
    6664#endif
    6765
     
    7472void InlineBox::destroy(RenderArena* renderArena)
    7573{
    76 #ifndef NDEBUG
     74#if !ASSERT_DISABLED
    7775    inInlineBoxDetach = true;
    7876#endif
    7977    delete this;
    80 #ifndef NDEBUG
     78#if !ASSERT_DISABLED
    8179    inInlineBoxDetach = false;
    8280#endif
     
    9492{
    9593    ASSERT(inInlineBoxDetach);
    96 
    9794    // Stash size where destroy can find it.
    9895    *(size_t *)ptr = sz;
  • trunk/Source/WebCore/rendering/InlineBox.h

    r148921 r151164  
    4141        , m_renderer(obj)
    4242        , m_logicalWidth(0)
    43 #ifndef NDEBUG
     43#if !ASSERT_DISABLED
    4444        , m_hasBadParent(false)
    4545#endif
     
    5656        , m_logicalWidth(logicalWidth)
    5757        , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal)
    58 #ifndef NDEBUG
     58#if !ASSERT_DISABLED
    5959        , m_hasBadParent(false)
    6060#endif
     
    273273    virtual float placeEllipsisBox(bool ltr, float visibleLeftEdge, float visibleRightEdge, float ellipsisWidth, float &truncatedWidth, bool&);
    274274
    275 #ifndef NDEBUG
     275#if !ASSERT_DISABLED
    276276    void setHasBadParent();
    277277#endif
     
    416416    bool extracted() const { return m_bitfields.extracted(); }
    417417
    418 #ifndef NDEBUG
     418#if !ASSERT_DISABLED
    419419private:
    420420    bool m_hasBadParent;
     
    422422};
    423423
    424 #ifdef NDEBUG
     424#if ASSERT_DISABLED
    425425inline InlineBox::~InlineBox()
    426426{
     
    428428#endif
    429429
    430 #ifndef NDEBUG
     430#if !ASSERT_DISABLED
    431431inline void InlineBox::setHasBadParent()
    432432{
Note: See TracChangeset for help on using the changeset viewer.