1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:57:34 +00:00

LibJS: Add JS_CELL macro and use it in all JS::Cell subclasses

This is similar to what we already had with JS_OBJECT (and also
JS_ENVIRONMENT) but sits at the top of the Cell inheritance hierarchy.
This commit is contained in:
Andreas Kling 2022-08-28 22:11:20 +02:00
parent 94f016b363
commit 6e973ce69b
16 changed files with 37 additions and 23 deletions

View file

@ -37,6 +37,8 @@ struct TransitionKey {
class Shape final
: public Cell
, public Weakable<Shape> {
JS_CELL(Shape, Cell);
public:
virtual ~Shape() override = default;
@ -84,7 +86,6 @@ public:
void reconfigure_property_in_unique_shape(StringOrSymbol const& property_key, PropertyAttributes attributes);
private:
virtual StringView class_name() const override { return "Shape"sv; }
virtual void visit_edges(Visitor&) override;
Shape* get_or_prune_cached_forward_transition(TransitionKey const&);