LibWeb: Abort dependent signals before firing abort event

Previously, there was a bug in the specification that would cause an
assertion failure, due to the abort event being fired before all
dependent signals were aborted.
This commit is contained in:
Tim Ledbetter 2024-09-08 21:10:52 +01:00 committed by Andreas Kling
commit 3ae4ea7b10
Notes: github-actions[bot] 2024-09-09 13:12:26 +00:00
3 changed files with 46 additions and 13 deletions

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const abortController = new AbortController();
const signal = AbortSignal.any([abortController.signal]);
abortController.signal.addEventListener("abort", () => { AbortSignal.any([signal]) });
abortController.abort();
println("PASS (didn't crash)");
});
</script>