[Webkit-unassigned] [Bug 246971] New: accessibility tests hit assertion on macOS with UI side compositing enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 24 16:15:22 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=246971

            Bug ID: 246971
           Summary: accessibility tests hit assertion on macOS with UI
                    side compositing enabled
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Process Model
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: heycam at apple.com

Some tests under LayoutTests/accessibility/ hit this assertion when run on macOS with UI side compositing enabled:

ASSERTION FAILED: m_isWaitingForDidUpdateGeometry
/Volumes/z/safari/d/OpenSource/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm(99) : virtual void WebKit::RemoteLayerTreeDrawingAreaProxy::didUpdateGeometry()

This is because:

1. The tests call testRunner.setViewSize().

2. This calls WKBundlePagePostSynchronousMessageForTesting(..., "SetViewSize", ...) in the Web content process, so that the test is blocked until the view size update is processed.

3. WKBundlePagePostSynchronousMessageForTesting calls WebPage::postSynchronousMessageForTesting, which sends a HandleSynchronousMessage("SetViewSize", ...) with the UseFullySynchronousModeForTesting flag.

4. On the UI process side, Connection::dispatchMessage for the HandleSynchronusMessage increments m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting because of the UseFullySynchronousModeForTesting flag that was set on the message it just received. The effect of this is to cause all async messages sent on the connection back to the Web content process to be wrapped in WrappedAsyncMessageForTesting and sent synchronously too.

5. The HandleSynchronusMessage("SetViewSize", ...) message is processed in TestInvocation::didReceiveSynchronousMessageFromInjectedBundle by calling resizeTo() on the WKView.

6. Under resizeTo(), we end up in RemoteLayerTreeDrawingAreaProxy::sizeDidChange(), which calls RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry(). This sends DrawingArea::UpdateGeometry, which is normally an async message, but because the connection is in this m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting mode, we send it synchronously.

7. The Web content process receives the UpdateGeometry message, does some more synchronous messaging back and forth with the UI process, and finally sends back a synchronous DidUpdateGeometry message.

8. Because RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry sets m_isWaitingForDidUpdateGeometry = true after the send() call, when we re-entrantly get into RemoteLayerTreeDrawingAreaProxy::didUpdateGeometry() to handle the DidUpdateGeometry message, we assert.

First thought was to move the m_isWaitingForDidUpdateGeometry = true assignment just above the send() call, but that's making the test time out. (Though possible it's timing out for other reasons.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221024/601b2252/attachment-0001.htm>


More information about the webkit-unassigned mailing list