[webkit-changes] [WebKit/WebKit] e954cf: Stop using near-suspended assertion on Mac

bnham noreply at github.com
Mon Feb 26 15:41:57 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e954cf3227f1d0672e1d61645e37400059d29e58
      https://github.com/WebKit/WebKit/commit/e954cf3227f1d0672e1d61645e37400059d29e58
  Author: Ben Nham <nham at apple.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    M Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
    M Source/WebKit/UIProcess/WebProcessCache.cpp
    M Source/WebKit/UIProcess/WebProcessCache.h

  Log Message:
  -----------
  Stop using near-suspended assertion on Mac
https://bugs.webkit.org/show_bug.cgi?id=270037
rdar://121058651

Reviewed by Chris Dumez.

In 272937 at main we stopped using the near-suspended process state on iOS so that background processes
suspended more promptly. However, we held off on doing that on the Mac because it caused a
regression in PLT5.

In this patch, we now stop using the near-suspended state on Mac as well. To fix the benchmark
regression, we preserve the old behavior of allowing cached processes to run in the background for
30 seconds after they enter the process cache by explicitly taking a background activity when the
process enters the cache.

* Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultShouldTakeNearSuspendedAssertion):
* Source/WebKit/UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::CachedProcess::takeProcess):
(WebKit::WebProcessCache::CachedProcess::startSuspensionTimer):
(WebKit::WebProcessCache::CachedProcess::suspensionTimerFired):
* Source/WebKit/UIProcess/WebProcessCache.h:

Canonical link: https://commits.webkit.org/275349@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