[Webkit-unassigned] [Bug 48255] Stack overflow when there are too many sibling inline boxes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 9 07:28:37 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=48255





--- Comment #6 from Yong Li <yong.li.webkit at gmail.com>  2010-11-09 07:28:37 PST ---
(In reply to comment #5)
> (From update of attachment 72703 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72703&action=review
> > WebCore/rendering/InlineBox.h:165
> > -    virtual void setConstructed()
> > -    {
> > -        m_constructed = true;
> > -        if (m_next)
> > -            m_next->setConstructed();
> > -    }
> > +    virtual void setConstructed() { m_constructed = true; }
> This looks like a behavior change to me, InlineBox::setConstructed() will no longer affect sibling boxes.
> Is this correct (and safe)?

It is safe.

> > WebCore/rendering/InlineBox.h:284
> > +    InlineBox* next() { return m_next; }
> This method should be const.

It is returning a non-const pointer. If we make such methods "const", it is potentially possible that some code gets non-const pointer through const pointer without a const_cast. Are we sure we want to do that?

I think usually we should add another const method when we need it:
const InlineBox* next() const { return m_next; }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list