[webkit-changes] [WebKit/WebKit] 3f7af1: [UI-side compositing] Guard against UI process han...
Simon Fraser
noreply at github.com
Mon May 8 11:18:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3f7af1859b92db6b242e50fa76450385e91628e0
https://github.com/WebKit/WebKit/commit/3f7af1859b92db6b242e50fa76450385e91628e0
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-05-08 (Mon, 08 May 2023)
Changed paths:
M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp
Log Message:
-----------
[UI-side compositing] Guard against UI process hangs caused by incorrect frame rate data
https://bugs.webkit.org/show_bug.cgi?id=256399
rdar://108954321
Reviewed by Chris Dumez.
The spin report in the radar suggests that the Safari main thread is blocked on
RemoteLayerTreeEventDispatcher::mainThreadDisplayDidRefresh() because the scrolling thread
is stuck in RemoteLayerTreeEventDispatcher::waitForRenderingUpdateCompletionOrTimeout().
The only way this can happen is that we send a long timeout to m_stateCondition.waitUntil(),
but this timeout should be at most half of the frame duration.
So protect against bad m_scrollingTree->frameDuration() data by imposing a cap
at at most 32ms on this timeout, and release log if it seems wrong.
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp:
(WebKit::RemoteLayerTreeEventDispatcher::waitForRenderingUpdateCompletionOrTimeout):
Canonical link: https://commits.webkit.org/263806@main
More information about the webkit-changes
mailing list