RESOLVED FIXED312929
Tests should not be relying on the Opportunistic Task Scheduler.
https://bugs.webkit.org/show_bug.cgi?id=312929
Summary Tests should not be relying on the Opportunistic Task Scheduler.
Mark Lam
Reported 2026-04-21 13:03:28 PDT
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.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-21 13:03:35 PDT
Mark Lam
Comment 2 2026-04-21 13:25:16 PDT
EWS
Comment 3 2026-04-21 14:52:51 PDT
Committed 311722@main (854e80f931d2): <https://commits.webkit.org/311722@main> Reviewed commits have been landed. Closing PR #63262 and removing active labels.
EWS
Comment 4 2026-04-28 23:23:13 PDT
Committed 305413.754@safari-7624-branch (c637b709ee18): <https://commits.webkit.org/305413.754@safari-7624-branch> Reviewed commits have been landed. Closing PR #5088 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.