mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
20 lines
407 B
HTML
20 lines
407 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();
|
|
|
|
println("PASS");
|
|
</script>
|