LibWeb: Stop the video decoder thread when the video element is GC'd

Otherwise, the thread will continue to run and access the media data
buffer, which will have been freed.

The test here is a bit strange, but the issue would only consistently
repro after several GC runs.
This commit is contained in:
Timothy Flynn 2024-04-25 08:39:19 -04:00 committed by Andreas Kling
parent f13ccb9a61
commit f6407276f7
Notes: sideshowbarker 2024-07-17 02:22:23 +09:00
8 changed files with 45 additions and 2 deletions

View file

@ -46,6 +46,7 @@ private:
HTMLVideoElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
virtual void finalize() override;
virtual void visit_edges(Cell::Visitor&) override;
virtual void attribute_changed(FlyString const& name, Optional<String> const& value) override;