Bug 64119

Summary: [chromium] Fix crash when compositing gets disabled mid-paint
Product: WebKit Reporter: Adrienne Walker <enne>
Component: New BugsAssignee: Adrienne Walker <enne>
Status: RESOLVED FIXED    
Severity: Normal CC: enne, jamesr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch jamesr: review+

Description Adrienne Walker 2011-07-07 12:32:08 PDT
[chromium] Fix crash when compositing gets disabled mid-paint
Comment 1 Adrienne Walker 2011-07-07 12:34:42 PDT
Created attachment 100018 [details]
Patch
Comment 3 James Robinson 2011-07-07 13:07:12 PDT
Comment on attachment 100018 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:369
> +    if (!m_rootLayer)
> +        return;

do we think painting a sublayer is turning the compositor off?  we already have a null-check + early-out after updateRootLayerContents()
Comment 4 Adrienne Walker 2011-07-07 13:10:27 PDT
(In reply to comment #3)
> (From update of attachment 100018 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=100018&action=review
> 
> > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:369
> > +    if (!m_rootLayer)
> > +        return;
> 
> do we think painting a sublayer is turning the compositor off?  we already have a null-check + early-out after updateRootLayerContents()

In this case, no.  However, there's no reason it couldn't.

I've fixed this bug at least three times now.  Can you forgive some extra checks for sanity's sake? :)
Comment 5 James Robinson 2011-07-07 13:23:29 PDT
Comment on attachment 100018 [details]
Patch

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

>>> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:369
>>> +        return;
>> 
>> do we think painting a sublayer is turning the compositor off?  we already have a null-check + early-out after updateRootLayerContents()
> 
> In this case, no.  However, there's no reason it couldn't.
> 
> I've fixed this bug at least three times now.  Can you forgive some extra checks for sanity's sake? :)

Yeah I know, but it's also really valuable to know which checks are working and which aren't.  We have some pretty defensive code in place to try to update compositing reqs for all layers before painting, so if that's failing then we should probably not bother since it's not free.  See http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/src/WebViewImpl.cpp#L1146

Would you mind landing just the second check (in drawLayers()) without this, letting it go to canary, and seeing what that does?
Comment 6 Adrienne Walker 2011-07-07 13:29:18 PDT
(In reply to comment #5)
> (From update of attachment 100018 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=100018&action=review

> Would you mind landing just the second check (in drawLayers()) without this, letting it go to canary, and seeing what that does?

Sure, will do.
Comment 7 Adrienne Walker 2011-07-07 13:34:19 PDT
Created attachment 100026 [details]
Patch
Comment 8 James Robinson 2011-07-07 13:35:19 PDT
Comment on attachment 100026 [details]
Patch

Lesse what happens
Comment 9 Adrienne Walker 2011-07-07 13:37:56 PDT
Committed r90587: <http://trac.webkit.org/changeset/90587>