BackForwardCache: Fix PaintTimings to record bfcache timings correctly
SetFirstPaintAfterBackForwardCacheRestoreSwap is called once when OnRestoredFromBackForwardCache is called once, by registering the callback. When OnRestoredFromBackForwardCache was called twice very quickly, two SetFirstPaintAfterBackForwardCacheRestoreSwap might try to set the same end of the timing vector, which was wrong update. This CL fixes this issue by specifying an index at the callback closure, instead of always updating the end of the timing vector. Bug: 1099395 Change-Id: Ic56d2c600d5f08cd7a71e4c03ac84a82a6925115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346690 Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org> Reviewed-by:Alexander Timin <altimin@chromium.org> Reviewed-by:
Nicolás Peña Moreno <npm@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#797606}
Showing
Please register or sign in to comment