Bug 216591 - REGRESSION(r266677): ASSERTION FAILED in PaintFrequencyTracker::end()
Summary: REGRESSION(r266677): ASSERTION FAILED in PaintFrequencyTracker::end()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-15 17:03 PDT by Said Abou-Hallawa
Modified: 2020-09-15 23:33 PDT (History)
12 users (show)

See Also:


Attachments
Patch (8.68 KB, patch)
2020-09-15 17:54 PDT, Said Abou-Hallawa
simon.fraser: review+
Details | Formatted Diff | Diff
Patch (9.15 KB, patch)
2020-09-15 19:03 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (8.81 KB, patch)
2020-09-15 21:27 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2020-09-15 17:03:14 PDT
Painting RenderLayers can be called from code paths which do not schedule RenderingUpdate through RenderingUpdateScheduler. This means RenderLayer::paintLayerContents() may be called while Page::updateRendering() is not on the call stack. This will make timestampForPaintFrequencyTracking() returns zero in this case. So PaintFrequencyTracker::end() will fail the assertion ASSERT(m_firstPaintTime). An example for this case is taking a snapshot of the page, or calling FrameView::paintContentsForSnapshot(). Another example is updating control tints or calling FrameView::updateControlTints().
Comment 1 Wenson Hsieh 2020-09-15 17:32:14 PDT
(In reply to Said Abou-Hallawa from comment #0)
> Painting RenderLayers can be called from code paths which do not schedule
> RenderingUpdate through RenderingUpdateScheduler. This means
> RenderLayer::paintLayerContents() may be called while
> Page::updateRendering() is not on the call stack. This will make
> timestampForPaintFrequencyTracking() returns zero in this case. So
> PaintFrequencyTracker::end() will fail the assertion
> ASSERT(m_firstPaintTime). An example for this case is taking a snapshot of
> the page, or calling FrameView::paintContentsForSnapshot(). Another example
> is updating control tints or calling FrameView::updateControlTints().

To clarify — `timestampForPaintFrequencyTracking()` will only return 0 if `Page::updateRendering()` has never been called (not if `RenderLayer::paintLayerContents()` is called while `Page::updateRendering()` is not on the call stack).
Comment 2 Said Abou-Hallawa 2020-09-15 17:54:47 PDT
Created attachment 408881 [details]
Patch
Comment 3 Said Abou-Hallawa 2020-09-15 18:36:53 PDT
<rdar://problem/68635418>
Comment 4 Said Abou-Hallawa 2020-09-15 19:03:45 PDT
Created attachment 408885 [details]
Patch
Comment 5 Said Abou-Hallawa 2020-09-15 21:27:00 PDT
Created attachment 408896 [details]
Patch
Comment 6 EWS 2020-09-15 23:33:20 PDT
Committed r267137: <https://trac.webkit.org/changeset/267137>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408896 [details].