Bug 91525 - REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
Summary: REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrienne Walker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 11:17 PDT by Adrienne Walker
Modified: 2012-07-17 16:07 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2012-07-17 13:13 PDT, Adrienne Walker
no flags Details | Formatted Diff | Diff
Reword comment (1.57 KB, patch)
2012-07-17 15:11 PDT, Adrienne Walker
jchaffraix: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrienne Walker 2012-07-17 11:17:31 PDT
REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
Comment 1 Adrienne Walker 2012-07-17 13:13:08 PDT
Created attachment 152812 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-07-17 13:41:55 PDT
Comment on attachment 152812 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152812&action=review

> Source/WebCore/rendering/RenderObject.cpp:2697
> +    if (!view())

So this is RenderView...  And document()->view() is FrameView?
Comment 3 Eric Seidel (no email) 2012-07-17 13:48:10 PDT
Comment on attachment 152812 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152812&action=review

>> Source/WebCore/rendering/RenderObject.cpp:2697
>> +    if (!view())
> 
> So this is RenderView...  And document()->view() is FrameView?

Yes, it is.  And we should really make that less confusing some day.

I'm confused what callstack would hit this?  I guess document destruction?  IT's not clear what you mean by "not been inserted into the tree", do you mean the document or the RenderImage?
Comment 4 Adrienne Walker 2012-07-17 14:17:58 PDT
(In reply to comment #3)
> (From update of attachment 152812 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=152812&action=review
> 
> >> Source/WebCore/rendering/RenderObject.cpp:2697
> >> +    if (!view())
> > 
> > So this is RenderView...  And document()->view() is FrameView?
> 
> Yes, it is.  And we should really make that less confusing some day.
> 
> I'm confused what callstack would hit this?  I guess document destruction?  IT's not clear what you mean by "not been inserted into the tree", do you mean the document or the RenderImage?

Maybe I shouldn't have included any comment at all.  ;)

Document destruction is one case, since the Document's renderer is cleared during that step.  Document attachment is the other, since that's when the renderer gets initially set.

I'm guessing at this being the issue given the callstack in the crashreport in the linked Chromium bug.  I wasn't able to repro this locally.
Comment 5 Adrienne Walker 2012-07-17 15:11:48 PDT
Created attachment 152841 [details]
Reword comment
Comment 6 Kwang Yul Seo 2012-07-17 15:18:06 PDT
Comment on attachment 152841 [details]
Reword comment

View in context: https://bugs.webkit.org/attachment.cgi?id=152841&action=review

> Source/WebCore/rendering/RenderObject.cpp:2699
> +

The patch looks good to me. I'm sorry to miss this in r122215.
Comment 7 Julien Chaffraix 2012-07-17 15:31:42 PDT
Comment on attachment 152841 [details]
Reword comment

View in context: https://bugs.webkit.org/attachment.cgi?id=152841&action=review

> Source/WebCore/ChangeLog:10
> +

It would be nice to mention why you couldn't produce a test case in your ChangeLog.

> Source/WebCore/rendering/RenderObject.cpp:2696
> +    // If the document is being destroyed or has not been attached, then this
> +    // RenderObject will not be rendered.

I am fine with the comment as-is though Eric may want to comment further.
Comment 8 Adrienne Walker 2012-07-17 16:06:55 PDT
Committed r122886: <http://trac.webkit.org/changeset/122886>
Comment 9 Adrienne Walker 2012-07-17 16:07:50 PDT
(In reply to comment #7)
> (From update of attachment 152841 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=152841&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +
> 
> It would be nice to mention why you couldn't produce a test case in your ChangeLog.

Done.

> > Source/WebCore/rendering/RenderObject.cpp:2696
> > +    // If the document is being destroyed or has not been attached, then this
> > +    // RenderObject will not be rendered.
> 
> I am fine with the comment as-is though Eric may want to comment further.

Sorry for going ahead and landing this, but I wanted to have a chance to get this in tomorrow's canary and see if it reduced the crash rate.  I'm happy to change the comment in a follow-up patch if you think that can be reworded better.  :)