LibJS: Convert Accessor::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:49 +00:00
commit 2b92c15b34
Notes: sideshowbarker 2024-07-17 07:43:05 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -17,9 +17,9 @@ class Accessor final : public Cell {
JS_CELL(Accessor, Cell);
public:
static Accessor* create(VM& vm, FunctionObject* getter, FunctionObject* setter)
static NonnullGCPtr<Accessor> create(VM& vm, FunctionObject* getter, FunctionObject* setter)
{
return vm.heap().allocate_without_realm<Accessor>(getter, setter);
return *vm.heap().allocate_without_realm<Accessor>(getter, setter);
}
FunctionObject* getter() const { return m_getter; }