Bug 312929
| Summary: | Tests should not be relying on the Opportunistic Task Scheduler. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | Tools / Tests | Assignee: | Mark Lam <mark.lam> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Mark Lam
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175276913>
Mark Lam
Pull request: https://github.com/WebKit/WebKit/pull/63262
EWS
Committed 311722@main (854e80f931d2): <https://commits.webkit.org/311722@main>
Reviewed commits have been landed. Closing PR #63262 and removing active labels.
EWS
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.