[webkit-changes] [WebKit/WebKit] 199ca3: Avoid updating hidden page timer throttling interv...

bnham noreply at github.com
Fri Mar 1 18:29:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 199ca3488158b61e977d8176fba7fcc8fd41a92e
      https://github.com/WebKit/WebKit/commit/199ca3488158b61e977d8176fba7fcc8fd41a92e
  Author: Ben Nham <nham at apple.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/WebProcess.messages.in

  Log Message:
  -----------
  Avoid updating hidden page timer throttling interval for suspended processes
https://bugs.webkit.org/show_bug.cgi?id=270236
rdar://problem/123773191

Reviewed by Chris Dumez.

Currently, every time a tab is created or destroyed, we update the hidden page timer throttling
interval and broadcast the change to all processes, including suspended processes. While this
doesn't cause a suspended process to resume, it can cause messages to build up in IPC queues that
never get drained. This is because the receiver might be a suspended WebContent process.

To avoid this, skip sending the timer throttling interval to suspended processes and defer the
update until the resume IPC.

* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::hiddenPageThrottlingAutoIncreaseLimit):
(WebKit::WebProcessPool::updateHiddenPageThrottlingAutoIncreaseLimit):
* Source/WebKit/UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToAllProcesses):
(WebKit::WebProcessPool::sendToAllProcessesForSession):
(WebKit::WebProcessPool::sendToAllRemoteWorkerProcesses):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessDidResume):
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit):
(WebKit::WebProcess::processDidResume):
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:

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