mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00

Print statements aren't necessary in crash tests and will cause a Javascript error when used.
17 lines
389 B
HTML
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>
|