Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf8a678029615e2ea281f759ff40b543fa94a67d
      
https://github.com/WebKit/WebKit/commit/cf8a678029615e2ea281f759ff40b543fa94a67d
  Author: Miguel Salinas <miguel_sali...@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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to