Bug 252415 - [Cocoa] Prevent active background page processes from suspending
Summary: [Cocoa] Prevent active background page processes from suspending
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Miguel Salinas
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-16 12:11 PST by Miguel Salinas
Modified: 2023-02-17 17:26 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Salinas 2023-02-16 12:11:06 PST
When a page is backgrounded we try to suspend its process if possible. When the internal setting "Take WebKit:Suspended assertion..." is disabled, this will cause the UI process to drop all of its process assertions on the web content process, effectively making it un-schedulable. This means that pages which may still be active will completely stop. This wasn't an issue before since the web content process would still be schedulable because it was holding the WebKit:Suspended assertion (this is very confusing since the WebKit:Suspended process assertion actually _prevents_ suspension). Instead of dropping all process assertions immediately upon being backgrounded, we should give the page/process some time to be scheduled and if it performs any observable work (e.g. changing document title text, sending a local notification, etc.) we should extend this time to be scheduled.
Comment 1 Miguel Salinas 2023-02-16 12:14:00 PST
rdar://105413250
Comment 2 Miguel Salinas 2023-02-16 14:37:15 PST
Pull request: https://github.com/WebKit/WebKit/pull/10228
Comment 3 EWS 2023-02-17 17:26:06 PST
Committed 260482@main (06fe365b1602): <https://commits.webkit.org/260482@main>

Reviewed commits have been landed. Closing PR #10228 and removing active labels.