[webkit-changes] [WebKit/WebKit] 0a93df: Regression: Pages that display notifications now g...

Chris Dumez noreply at github.com
Mon Mar 11 12:30:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a93df5a4011148e3185a1d9c0ecdd448f8531da
      https://github.com/WebKit/WebKit/commit/0a93df5a4011148e3185a1d9c0ecdd448f8531da
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxyInternals.h

  Log Message:
  -----------
  Regression: Pages that display notifications now get suspended as soon as backgrounded
https://bugs.webkit.org/show_bug.cgi?id=270796
rdar://124390299

Reviewed by Ben Nham.

We used to prevent suspension in the background of pages that show (or are
likely to show) notifications. However, we recently stopped taking
near-suspended assertions on both iOS and macOS and it broke this heuristic.

To address the issue, we now take a background activity whenever we get a
signal that a page displayed (or is likely to display) notifications. This way,
the page won't suspend after backgrounding, even though we're no longer taking
near-suspended assertions.

Note that the heuristic was also checking if a page updated its title while in
the background. This part of the heuristic is still broken and still needs to
be addressed in a follow-up.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::pageWillLikelyUseNotifications):
(WebKit::WebPageProxy::showNotification):
* Source/WebKit/UIProcess/WebPageProxyInternals.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list