mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Do not spin the event loop awaiting text track state changes
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.
This commit is contained in:
Notes:
github-actions[bot]
2025-06-12 16:26:50 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/de34143a4ef Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5068 Reviewed-by: https://github.com/tcl3
@@ -0,0 +1,21 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user