diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-28 22:11:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-29 03:24:54 +0200 |
commit | 6e973ce69b2205779b9999e15c45d95a015f15b3 (patch) | |
tree | 3b5da1efe4c3a4f11e1577c58b2e280ff2afefc9 /Userland/Libraries/LibJS/Runtime/Object.h | |
parent | 94f016b363c2ee969637217d73890d8dd5d7f3e5 (diff) | |
download | serenity-6e973ce69b2205779b9999e15c45d95a015f15b3.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Object.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Object.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h index 8dd728acfe..13f6bd9a70 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.h +++ b/Userland/Libraries/LibJS/Runtime/Object.h @@ -46,6 +46,8 @@ struct PrivateElement { }; class Object : public Cell { + JS_CELL(Object, Cell); + public: static Object* create(Realm&, Object* prototype); @@ -174,7 +176,6 @@ public: bool has_parameter_map() const { return m_has_parameter_map; } void set_has_parameter_map() { m_has_parameter_map = true; } - virtual StringView class_name() const override { return "Object"sv; } virtual void visit_edges(Cell::Visitor&) override; Value get_direct(size_t index) const { return m_storage[index]; } |