ladybird/Tests/LibWeb/Text/input/fetch-timed-out-request.html
Tim Ledbetter c6f070d29e LibWeb/Fetch: Don't crash when a fetch request times out
Previously, calling fetch with a signal object provided by
`AbortSignal.timeout()` would cause a crash when the signal timed out.

We now push a `TemporaryExecutionContext` to the stack when we invoke
the signal's abort steps, as an execution context is required when
calling native functions.
2024-04-14 13:36:25 +02:00

12 lines
293 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<script>
asyncTest(async done => {
try {
await fetch("about:srcdoc", { signal: AbortSignal.timeout(0) });
} finally {
println("PASS (didn't crash)");
done();
}
});
</script>