WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
268799
hideContentUntilPendingUpdate async IPC call during backgrounding blocks process suspension
https://bugs.webkit.org/show_bug.cgi?id=268799
Summary
hideContentUntilPendingUpdate async IPC call during backgrounding blocks proc...
Ben Nham
Reported
2024-02-05 21:01:10 PST
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Ben Nham
Comment 1
2024-02-05 21:01:26 PST
rdar://121185956
Ben Nham
Comment 2
2024-02-05 21:12:29 PST
Pull request:
https://github.com/WebKit/WebKit/pull/23900
EWS
Comment 3
2024-02-06 10:51:58 PST
Committed
274157@main
(f4ce57789de5): <
https://commits.webkit.org/274157@main
> Reviewed commits have been landed. Closing PR #23900 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug