[Webkit-unassigned] [Bug 87533] Crash in styleForFirstLetter (pseudoStyle is null)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 29 18:55:04 PDT 2012


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





--- Comment #10 from Joe Thomas <joethomas at motorola.com>  2012-05-29 18:55:03 PST ---
(In reply to comment #9)
> (From update of attachment 144630 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=144630&action=review
> 
> Interesting.  I would have assumed that getCachedPsuedoStyle might have returned the normal style when there is no pseudo.

When there are no matching properties, StyleResolver::pseudoStyleForElement returns null from the time this function is introduced(http://trac.webkit.org/changeset/5234).

Apart from the above case, getCachedPseudoStyle can return null from various other places.  And currently whoever calls this function also handles the null case except the place where we are getting the crash now. 

> 
> > Source/WebCore/rendering/RenderBlock.cpp:6024
> > +    if (!pseudoStyle)
> > +        return;
> 
> What if the style changed to detach? or to no longer be a first letter?  Is this early-return safe?

With my limited knowledge in rendering, early return looks fine to me as we cannot execute these functions further without Pseudo RenderStyle.

-- 
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