LibWeb: Make Platform::Timer GC-allocated

This will allow us to remove the use of SafeFunction in it's
implementation. This requires a fair amount of plumbing to wire up the
GC heap to the appropriate places in order to create the timers.
This commit is contained in:
Shannon Booth 2024-10-30 21:37:08 +13:00 committed by Alexander Kalenik
commit ede3c91688
Notes: github-actions[bot] 2024-10-30 19:57:28 +00:00
15 changed files with 52 additions and 38 deletions

View file

@ -28,12 +28,7 @@ public:
}
virtual ~ImageStyleValue() override;
void visit_edges(JS::Cell::Visitor& visitor) const
{
// FIXME: visit_edges in non-GC allocated classes is confusing pattern.
// Consider making CSSStyleValue to be GC allocated instead.
visitor.visit(m_resource_request);
}
void visit_edges(JS::Cell::Visitor& visitor) const;
virtual String to_string() const override;
virtual bool equals(CSSStyleValue const& other) const override;
@ -67,7 +62,7 @@ private:
size_t m_current_frame_index { 0 };
size_t m_loops_completed { 0 };
RefPtr<Platform::Timer> m_timer;
JS::GCPtr<Platform::Timer> m_timer;
};
}