Skip to content

Commit

Permalink
LibJS: Remove unused Accessor::call_{getter,setter}()
Browse files Browse the repository at this point in the history
If only we had such "a way to communicate to our caller if an exception
happened" - too bad it's dead code :^)
  • Loading branch information
linusg committed Jan 4, 2022
1 parent 0e363e9 commit b4208c8
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Userland/Libraries/LibJS/Runtime/Accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,6 @@ class Accessor final : public Cell {
FunctionObject* setter() const { return m_setter; }
void set_setter(FunctionObject* setter) { m_setter = setter; }

Value call_getter(Value this_value)
{
if (!m_getter)
return js_undefined();
return TRY_OR_DISCARD(vm().call(*m_getter, this_value));
}

void call_setter(Value this_value, Value setter_value)
{
if (!m_setter)
return;
// FIXME: It might be nice if we had a way to communicate to our caller if an exception happened after this.
[[maybe_unused]] auto rc = vm().call(*m_setter, this_value, setter_value);
}

void visit_edges(Cell::Visitor& visitor) override
{
visitor.visit(m_getter);
Expand Down

0 comments on commit b4208c8

Please sign in to comment.