Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b56a059223f8116c20cfd668ae8935e84d800de
      
https://github.com/WebKit/WebKit/commit/7b56a059223f8116c20cfd668ae8935e84d800de
  Author: Ben Nham <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/hidden-page-dom-timer-throttling-limit-expected.txt
    A 
LayoutTests/http/tests/site-isolation/hidden-page-dom-timer-throttling-limit.html
    A 
LayoutTests/http/tests/site-isolation/resources/dom-timer-throttling-state-frame.html
    M Source/WebCore/page/Page.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/WebKit/Shared/WebProcessCreationParameters.h
    M Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h

  Log Message:
  -----------
  Make hidden page throttling heuristics apply to newly created pages
https://bugs.webkit.org/show_bug.cgi?id=322231
rdar://185461584

Reviewed by Ryosuke Niwa.

A newly created page can run with the wrong hidden page throttling timer state:

- If the page is created in a new WebProcess, then the initial state is 
incorrect, because we don't
  pass the hidden page throttling state as part of process creation.

- If the page is created in an existing WebProcess, then the initial state is 
incorrect, because we
  don't store the last used hidden page throttling state anywhere and apply it 
to the newly created
  page.

Fix this by adding hiddenPageDOMTimerThrottlingIncreaseLimit as a process 
creation parameter and
also store it globally on the WebProcess side.

This happens more when Site Isolation is enabled, since creating a new iframe 
while hidden will
create a new process with potentially stale throttling flags.

* 
LayoutTests/http/tests/site-isolation/hidden-page-dom-timer-throttling-limit-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/hidden-page-dom-timer-throttling-limit.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/dom-timer-throttling-state-frame.html:
 Added.
* Source/WebCore/page/Page.h:
(WebCore::Page::domTimerAlignmentIntervalIncreaseLimit const):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::domTimerAlignmentInterval const):
(WebCore::Internals::domTimerAlignmentIntervalIncreaseLimit const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/Shared/WebProcessCreationParameters.serialization.in:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::updateHiddenPageThrottlingAutoIncreaseLimit):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit):
* Source/WebKit/WebProcess/WebProcess.h:

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



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

Reply via email to