LibJS: Convert reference deletion to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-11-02 18:38:51 +02:00 committed by Linus Groh
commit d73b258874
Notes: sideshowbarker 2024-07-18 01:33:45 +09:00
4 changed files with 10 additions and 14 deletions

View file

@ -1120,7 +1120,7 @@ Value UnaryExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
auto reference = m_lhs->to_reference(interpreter, global_object);
if (interpreter.exception())
return {};
return Value(reference.delete_(global_object));
return Value(TRY_OR_DISCARD(reference.delete_(global_object)));
}
Value lhs_result;