Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 52b8b3ddcd9739a4e135245b32a80bc8fc1f591f
      
https://github.com/WebKit/WebKit/commit/52b8b3ddcd9739a4e135245b32a80bc8fc1f591f
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2025-08-18 (Mon, 18 Aug 2025)

  Changed paths:
    M Source/WebKit/UIProcess/DrawingAreaProxy.cpp
    M Source/WebKit/UIProcess/DrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

  Log Message:
  -----------
  REGRESSION (260209@main?): [iOS/macOS] 
TestWebKitAPI.ProcessSwap.PageOverlayLayerPersistence is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=252863
rdar://106098852

Reviewed by Simon Fraser.

There is an edge case where WKWebView._doAfterNextPresentationUpdate will never 
call its completion handler.
This can happen when we call _doAfterNextPresentationUpdate during a cross-site 
navigation that swaps processes
and swaps DrawingAreaProxy objects.  Before 260209@main we would call 
CallbackMap.invalidate to immediately call
all the completion handlers in the DrawingAreaProxy destructor.  After 
260209@main we were relying on the
Connection destructor to call all the outstanding completion handlers.  
However, if the process being navigated
away from goes into the process cache, it will not have its connection 
destroyed, so these completion handlers
will wait forever for a layer tree transaction to come from the process we 
navigated away from.  To restore
previous behavior, keep a set of outstanding callbacks on the DrawingAreaProxy 
and call any of them in the
DrawingAreaProxy destructor.

* Source/WebKit/UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::addOutstandingPresentationUpdateCallback):
(WebKit::DrawingAreaProxy::removeOutstandingPresentationUpdateCallback):
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchPresentationCallbacksAfterFlushingLayers):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
((ProcessSwap, PageOverlayLayerPersistence)):
((ProcessSwap, DISABLED_PageOverlayLayerPersistence)(ProcessSwap, 
PageOverlayLayerPersistence)): Deleted.

Canonical link: https://commits.webkit.org/298872@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to