Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 854e80f931d2d8197f6fac430220e97b2bd73624
https://github.com/WebKit/WebKit/commit/854e80f931d2d8197f6fac430220e97b2bd73624
Author: Mark Lam <[email protected]>
Date: 2026-04-21 (Tue, 21 Apr 2026)
Changed paths:
M LayoutTests/fast/dom/gc-dom-tree-lifetime-shadow-tree.html
M LayoutTests/fast/dom/gc-dom-tree-lifetime.html
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
Tests should not be relying on the Opportunistic Task Scheduler.
https://bugs.webkit.org/show_bug.cgi?id=312929
rdar://175276913
Reviewed by Ryosuke Niwa.
By definition, the Opportunistic Task Scheduler is opportunistic. Hence, any
work
it does is discretionary and optional. Even if OTS behaves somewhat
deterministic
today, it is not guaranteed to in perpetuity. Hence, any tests relying on it
being
deterministic would be brittle at best.
The fast/dom/gc-dom-tree-lifetime-shadow-tree.html and
fast/dom/gc-dom-tree-lifetime.html
tests were erroneously relying on OTS being deterministic. What these tests
really
wanted was for DOM nodes to be released after a GC runs. Instead of relying on
OTS,
we're introducing internals.releaseMemoryNow() to be used instead.
internals.releaseMemoryNow() will run the same clean up code as when we receive
a
critical memory warning, and will aggressively clean up as much memory as it
can,
including the DOM nodes that are no longer used. Hence,
internals.releaseMemoryNow()
is the right tool to use for these tests.
Covered by the 2 existing tests.
* LayoutTests/fast/dom/gc-dom-tree-lifetime-shadow-tree.html:
* LayoutTests/fast/dom/gc-dom-tree-lifetime.html:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::releaseMemoryNow const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Canonical link: https://commits.webkit.org/311722@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications