mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
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
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)
|
if (m_associated_document)
|
||||||
m_associated_document->disassociate_with_timeline(*this);
|
m_associated_document->disassociate_with_timeline(*this);
|
||||||
|
|
|
@ -35,10 +35,10 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AnimationTimeline(JS::Realm&);
|
AnimationTimeline(JS::Realm&);
|
||||||
virtual ~AnimationTimeline() override;
|
|
||||||
|
|
||||||
virtual void initialize(JS::Realm&) override;
|
virtual void initialize(JS::Realm&) override;
|
||||||
virtual void visit_edges(Cell::Visitor&) override;
|
virtual void visit_edges(Cell::Visitor&) override;
|
||||||
|
virtual void finalize() override;
|
||||||
|
|
||||||
// https://www.w3.org/TR/web-animations-1/#dom-animationtimeline-currenttime
|
// https://www.w3.org/TR/web-animations-1/#dom-animationtimeline-currenttime
|
||||||
Optional<double> m_current_time {};
|
Optional<double> m_current_time {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue