mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibJS: Replace the boolean argument of Object::set with an enum class
This is more serenity-esque and also makes pointing out missing exception checks during reviews much easier.
This commit is contained in:
parent
4b39e718b3
commit
8d01d43f5e
Notes:
sideshowbarker
2024-07-18 08:56:03 +09:00
Author: https://github.com/IdanHo
Commit: 8d01d43f5e
Pull-request: https://github.com/SerenityOS/serenity/pull/8804
17 changed files with 73 additions and 66 deletions
|
@ -234,7 +234,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(), true);
|
||||
object->set(interpreter.current_executable().get_string(m_property), interpreter.accumulator(), Object::ShouldThrowExceptions::Yes);
|
||||
}
|
||||
|
||||
void Jump::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
|
@ -427,7 +427,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(), true);
|
||||
object->set(property_key, interpreter.accumulator(), Object::ShouldThrowExceptions::Yes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue