1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00
ladybird/Tests/LibWeb/Crash/JS/finalization-registry-basic.html
Tim Ledbetter d67a95c37e Tests: Remove print statement from crash test
Print statements aren't necessary in crash tests and will cause a
Javascript error when used.
2025-03-27 19:30:41 +00:00

17 lines
389 B
HTML

<script src="../../Text/input/include.js"></script>
<script>
// NOTE: This test is only reliable when GC'ing after each allocation.
const registry = new FinalizationRegistry((heldValue) => {
console.log(heldValue);
});
const makeGarbage = () => {
registry.register(new String("ok"), "hello");
};
makeGarbage();
if (window.internals !== undefined)
internals.gc();
</script>