mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +00:00
LibWeb: Abort early processing frame/iframe attrs for null navigables
We guarded one step against a null navigable, but the very next step also needs to be protected. Let's just abort early instead. This was caught by the following imported WPT test: html/dom/elements/the-innertext-and-outertext-properties/innertext-setter.html This test adds a <frame> element and immediately removes it, but the task to process the src attribute is already queued. Note that <iframe> would have the same issue, but this test does not include them.
This commit is contained in:
committed by
Tim Ledbetter
parent
16def85153
commit
50a31f9728
@@ -0,0 +1,20 @@
|
||||
<head>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
let frameset = document.getElementById("frameset");
|
||||
|
||||
let frame = document.createElement("frame");
|
||||
frameset.appendChild(frame);
|
||||
frame.remove();
|
||||
|
||||
// Attempting to load the frame will happen in a task on the event loop, so defer completing this test until
|
||||
// the event loop has spun once.
|
||||
setTimeout(() => {
|
||||
println("PASS! (Didn't crash)");
|
||||
done();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<frameset id="frameset"></frameset>
|
||||
Reference in New Issue
Block a user