LibWeb: Unregister AnimationTimeline from document in finalize()
...instead of destructor because by the time it is executed, document could already be destroyed.
This commit is contained in:
parent
bcdf4a375d
commit
2129c5d8b0
Notes:
sideshowbarker
2024-07-17 02:55:44 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/2129c5d8b0 Pull-request: https://github.com/SerenityOS/serenity/pull/23546
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ AnimationTimeline::AnimationTimeline(JS::Realm& realm)
|
|||
{
|
||||
}
|
||||
|
||||
AnimationTimeline::~AnimationTimeline()
|
||||
void AnimationTimeline::finalize()
|
||||
{
|
||||
if (m_associated_document)
|
||||
m_associated_document->disassociate_with_timeline(*this);
|
||||
|
|
|
@ -35,10 +35,10 @@ public:
|
|||
|
||||
protected:
|
||||
AnimationTimeline(JS::Realm&);
|
||||
virtual ~AnimationTimeline() override;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual void finalize() override;
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animationtimeline-currenttime
|
||||
Optional<double> m_current_time {};
|
||||
|
|
Loading…
Add table
Reference in a new issue