mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:17:44 +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
17 changed files with 73 additions and 66 deletions
|
@ -160,7 +160,7 @@ void VM::set_variable(const FlyString& name, Value value, GlobalObject& global_o
|
|||
return;
|
||||
}
|
||||
|
||||
global_object.set(name, value, true);
|
||||
global_object.set(name, value, Object::ShouldThrowExceptions::Yes);
|
||||
}
|
||||
|
||||
bool VM::delete_variable(FlyString const& name)
|
||||
|
@ -298,7 +298,7 @@ void VM::assign(const NonnullRefPtr<BindingPattern>& target, Value value, Global
|
|||
continue;
|
||||
if (seen_names.contains(object_property.key.to_display_string()))
|
||||
continue;
|
||||
rest_object->set(object_property.key, object->get(object_property.key), true);
|
||||
rest_object->set(object_property.key, object->get(object_property.key), Object::ShouldThrowExceptions::Yes);
|
||||
if (exception())
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue