DescriptionBuffer timing callbacks until timing state converges.
With our recent change to merge paint timings across all frames in
a page, some of the timing ordering assumptions we make, such as
parse and layout always starting before paint, can be violated.
More specifically, we can observe sequences like the following:
* parse starts in main frame
* child frame created
* child frame paints
* child frame reports paint event
* parent frame reports parse start event
Even though the events happened in the expected order, due to cross
frame buffering, we are notified of the child paint before the
main frame parse start.
This change addresses this issue, by buffering observer callbacks until
we've received events with the expected ordering.
zhenw's recent change https://codereview.chromium.org/2872793002 encountered
this issue and had to be rolled back as a result.
I confirmed that, with zhen's patch applied, the flaky test failed on 8 of
10 runs. With zhen's patch and this patch applied, that same test passed 10
of 10 times.
BUG=722860
Review-Url: https://codereview.chromium.org/2885053002
Cr-Commit-Position: refs/heads/master@{#472199}
Committed: https://chromium.googlesource.com/chromium/src/+/8a886995ef55f7c165f50a27a309761c7432bc2c
Patch Set 1 #Patch Set 2 : fix comment #Patch Set 3 : add test #
Total comments: 5
Patch Set 4 : address comments #
Messages
Total messages: 26 (17 generated)
|