Changeset 151946 in webkit


Ignore:
Timestamp:
Jun 24, 2013 6:28:19 PM (11 years ago)
Author:
Simon Fraser
Message:

Don't crash if renderName() is called on a renderer with no style
https://bugs.webkit.org/show_bug.cgi?id=117960

Reviewed by Dave Hyatt.

Calling renderName() at the top of RenderObject::willChangeStyle() when
adding debug logging would often crash because various functions called
from renderName() assume style is non-null. Fix this.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::renderName):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::renderName):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151935 r151946  
     12013-06-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't crash if renderName() is called on a renderer with no style
     4        https://bugs.webkit.org/show_bug.cgi?id=117960
     5
     6        Reviewed by Dave Hyatt.
     7
     8        Calling renderName() at the top of RenderObject::willChangeStyle() when
     9        adding debug logging would often crash because various functions called
     10        from renderName() assume style is non-null. Fix this.
     11
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::RenderBlock::renderName):
     14        * rendering/RenderInline.cpp:
     15        (WebCore::RenderInline::renderName):
     16
    1172013-06-24  Alex Christensen  <achristensen@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r151843 r151946  
    79597959    if (isOutOfFlowPositioned())
    79607960        return "RenderBlock (positioned)";
    7961     if (isAnonymousColumnsBlock())
     7961    if (style() && isAnonymousColumnsBlock())
    79627962        return "RenderBlock (anonymous multi-column)";
    7963     if (isAnonymousColumnSpanBlock())
     7963    if (style() && isAnonymousColumnSpanBlock())
    79647964        return "RenderBlock (anonymous multi-column span)";
    7965     if (isAnonymousBlock())
     7965    if (style() && isAnonymousBlock())
    79667966        return "RenderBlock (anonymous)";
    79677967    // FIXME: Temporary hack while the new generated content system is being implemented.
     
    79747974    if (isStickyPositioned())
    79757975        return "RenderBlock (sticky positioned)";
    7976     if (isRunIn())
     7976    if (style() && isRunIn())
    79777977        return "RenderBlock (run-in)";
    79787978    return "RenderBlock";
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r151425 r151946  
    757757    if (isAnonymous())
    758758        return "RenderInline (generated)";
    759     if (isRunIn())
     759    if (style() && isRunIn())
    760760        return "RenderInline (run-in)";
    761761    return "RenderInline";
Note: See TracChangeset for help on using the changeset viewer.