-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regression: Pages that update their title now get suspended when back…
…grounded https://bugs.webkit.org/show_bug.cgi?id=270813 rdar://124222280 Reviewed by Ben Nham. Pages that update their title now get suspended when backgrounded since we've stopped taking near-suspended assertions on both iOS and macOS. We used to monitor pages in the background for 8 minutes to see if they update their title while in the background, if they did, we would let them keep running in the background. Since we no longer take near-suspended assertions, we can no longer observe pages in the background (since they'd get suspended as soon as backgrounded). To address the issue, we now monitor title changes while in the foreground. If the page updates its title, we now take a background assertion to let it keep running after backgrounding. This is not perfect but this addresses the regression for now. We should revisit though because this is too permissive. Maybe we only want to consider title changes without recent user interaction for e.g. * Source/WebKit/UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::ProcessThrottler): (WebKit::ProcessThrottler::dropNearSuspendedAssertionTimerFired): (WebKit::m_shouldTakeUIBackgroundAssertion): Deleted. (WebKit::ProcessThrottler::pageAllowedToRunInTheBackgroundToken): Deleted. (WebKit::ProcessThrottler::numberOfPagesAllowedToRunInTheBackgroundChanged): Deleted. * Source/WebKit/UIProcess/ProcessThrottler.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::resetStateAfterProcessExited): * Source/WebKit/UIProcess/WebPageProxyInternals.h: Canonical link: https://commits.webkit.org/275960@main
- Loading branch information
Showing
4 changed files
with
9 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters