Bug 64119 - [chromium] Fix crash when compositing gets disabled mid-paint
Summary: [chromium] Fix crash when compositing gets disabled mid-paint
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: 2011-07-07 12:32 PDT by Adrienne Walker
Modified: 2011-07-07 13:37 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2011-07-07 12:34 PDT, Adrienne Walker
no flags Details | Formatted Diff | Diff
Patch (1.56 KB, patch)
2011-07-07 13:34 PDT, Adrienne Walker
jamesr: 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 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>