On iOS, when the UIProcess goes into the background, it eventually calls in to hideContentUntilPendingUpdate through this call stack: WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate() WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground() WebKit::ApplicationStateTracker::didCompleteSnapshotSequence() The problem is that we recently added an async DrawingArea::DispatchAfterEnsuringDrawing IPC with reply handler call to hideContentUntilPendingUpdate (see 269776@main, 270672@main, and 271260@main). An async IPC with a reply handler in the UIProcess implicitly takes out a background activity which prevents the WebContent process (and also the UIProcess) from suspending until the reply handler runs. Unfortunately, since the WebContent process is in the background, presumably it doesn't render, so the DispatchAfterEnsuringDrawing reply handler doesn't even run and we basically end up blocking process suspension entirely until the 15 second timer in ProcessStateMonitor expires and forcefully cancels all background activities for all processes. We need to fix this by reworking the logic somehow or by making this DispatchAfterEnsuringDrawing IPC not create a background activity.
rdar://121185956
Pull request: https://github.com/WebKit/WebKit/pull/23900
Committed 274157@main (f4ce57789de5): <https://commits.webkit.org/274157@main> Reviewed commits have been landed. Closing PR #23900 and removing active labels.