1
0
Fork 0
firefox/testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
513 B
JavaScript

// This is a repro for a crash bug that existed in Blink. See
// https://crbug.com/1290014. If there's no crash then the test passed.
test(t => {
const iframeTag = document.createElement('iframe');
document.body.appendChild(iframeTag);
const readableStream = new ReadableStream();
const reader = new iframeTag.contentWindow.ReadableStreamDefaultReader(readableStream);
iframeTag.remove();
reader.cancel();
reader.read();
}, 'should not crash on reading from stream cancelled in destroyed realm');