[webkit-changes] [WebKit/WebKit] cf8a67: [macOS] Stop ProcessThrottler for dead processes

Miguel Salinas noreply at github.com
Tue Apr 4 10:45:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf8a678029615e2ea281f759ff40b543fa94a67d
      https://github.com/WebKit/WebKit/commit/cf8a678029615e2ea281f759ff40b543fa94a67d
  Author: Miguel Salinas <miguel_salinas at apple.com>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ProcessThrottler.cpp
    M Source/WebKit/UIProcess/ProcessThrottler.h
    M Source/WebKit/UIProcess/WebProcessProxy.cpp

  Log Message:
  -----------
  [macOS] Stop ProcessThrottler for dead processes
https://bugs.webkit.org/show_bug.cgi?id=254838
rdar://106070798

Reviewed by Chris Dumez.

We have a bug report where the ProcessThrottler continues to take
assertions on a process after it's been terminated. Usually when a
process is terminated, its corresponding WebProcessProxy and
ProcessThrottler are destroyed so this isn't an issue. However, when a
process is killed by our background CPU usage monitor the
WebProcessProxy and ProcessThrottler are not destroyed until we lazily
relaunch the process. This fix tells the ProcessThrottler that we've
disconnected from our process so that it stops trying to take process
assertions.

* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didDisconnectFromProcess):
* Source/WebKit/UIProcess/ProcessThrottler.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):

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




More information about the webkit-changes mailing list