mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
Otherwise, the thread will continue to run and access the media data buffer, which will have been freed. The test here is a bit strange, but the issue would only consistently repro after several GC runs.
26 lines
627 B
HTML
26 lines
627 B
HTML
<iframe id=iframe></iframe>
|
|
<script src="include.js"></script>
|
|
<script>
|
|
function navigateIframe(src) {
|
|
return new Promise(resolve => {
|
|
iframe.addEventListener("load", () => {
|
|
resolve();
|
|
});
|
|
iframe.src = src;
|
|
});
|
|
}
|
|
|
|
asyncTest(async done => {
|
|
await navigateIframe("../data/video-gc-frame.html");
|
|
await navigateIframe("../data/iframe-test-content-1.html");
|
|
iframe.remove();
|
|
|
|
for (let i = 0; i < 5; ++i) {
|
|
internals.gc();
|
|
}
|
|
|
|
println("PASS (didn't crash)");
|
|
done();
|
|
});
|
|
</script>
|