mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibJS: Convert Object::set() to ThrowCompletionOr
This commit is contained in:
parent
b7e5f08e56
commit
1d45541278
18 changed files with 89 additions and 188 deletions
|
@ -249,7 +249,7 @@ void GetById::execute_impl(Bytecode::Interpreter& interpreter) const
|
|||
void PutById::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
if (auto* object = interpreter.reg(m_base).to_object(interpreter.global_object()))
|
||||
object->set(interpreter.current_executable().get_string(m_property), interpreter.accumulator(), Object::ShouldThrowExceptions::Yes);
|
||||
MUST(object->set(interpreter.current_executable().get_string(m_property), interpreter.accumulator(), Object::ShouldThrowExceptions::Yes));
|
||||
}
|
||||
|
||||
void Jump::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
|
@ -447,7 +447,7 @@ void PutByValue::execute_impl(Bytecode::Interpreter& interpreter) const
|
|||
auto property_key = interpreter.reg(m_property).to_property_key(interpreter.global_object());
|
||||
if (interpreter.vm().exception())
|
||||
return;
|
||||
object->set(property_key, interpreter.accumulator(), Object::ShouldThrowExceptions::Yes);
|
||||
MUST(object->set(property_key, interpreter.accumulator(), Object::ShouldThrowExceptions::Yes));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue