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

LibJS: Remove unused Accessor::call_{getter,setter}()

If only we had such "a way to communicate to our caller if an exception
happened" - too bad it's dead code :^)
This commit is contained in:
Linus Groh 2022-01-04 21:54:58 +01:00
parent 0e363e92ef
commit b4208c8ea1

View file

@ -31,21 +31,6 @@ public:
FunctionObject* setter() const { return m_setter; } FunctionObject* setter() const { return m_setter; }
void set_setter(FunctionObject* setter) { m_setter = 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 void visit_edges(Cell::Visitor& visitor) override
{ {
visitor.visit(m_getter); visitor.visit(m_getter);