mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-08 09:11:01 +00:00
The text track processing model would previously spin forever waiting for the track URL to change. It would then recursively invoke itself to handle the new URL, again entering the spin loop. This meant that tracks could easily cause event loop hangs. We now have an observer system to be notified when the track state changes instead. This lets us exit the processing model and move on.
21 lines
529 B
HTML
21 lines
529 B
HTML
<!DOCTYPE html>
|
|
<!-- Ensure the processing model does not block other resources from loading. -->
|
|
<img id="image" src="../../../Assets/120.png" />
|
|
<video>
|
|
<track src="../../../Assets/track.vtt" />
|
|
</video>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest(done => {
|
|
const complete = () => {
|
|
println("PASS!");
|
|
done();
|
|
};
|
|
|
|
if (image.complete) {
|
|
complete();
|
|
} else {
|
|
image.addEventListener("load", complete);
|
|
}
|
|
});
|
|
</script>
|