mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +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:
parent
94f016b363
commit
6e973ce69b
16 changed files with 37 additions and 23 deletions
|
@ -65,6 +65,8 @@ ThrowCompletionOr<PromiseCapability> new_promise_capability(VM& vm, Value constr
|
|||
|
||||
// 27.2.1.2 PromiseReaction Records, https://tc39.es/ecma262/#sec-promisereaction-records
|
||||
class PromiseReaction final : public Cell {
|
||||
JS_CELL(PromiseReaction, Cell);
|
||||
|
||||
public:
|
||||
enum class Type {
|
||||
Fulfill,
|
||||
|
@ -86,7 +88,6 @@ public:
|
|||
Optional<JobCallback> const& handler() const { return m_handler; }
|
||||
|
||||
private:
|
||||
virtual StringView class_name() const override { return "PromiseReaction"sv; }
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
Type m_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue