1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

LibJS: Convert get_binding_value() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-09 19:43:19 +01:00
parent 7652138ce0
commit f35e268024
11 changed files with 43 additions and 27 deletions

View file

@ -829,7 +829,7 @@ Object* create_mapped_arguments_object(GlobalObject& global_object, FunctionObje
object->parameter_map().define_native_accessor(
PropertyName { index },
[&environment, name](VM&, GlobalObject& global_object_getter) -> Value {
return environment.get_binding_value(global_object_getter, name, false);
return MUST(environment.get_binding_value(global_object_getter, name, false));
},
[&environment, name](VM& vm, GlobalObject& global_object_setter) {
MUST(environment.set_mutable_binding(global_object_setter, name, vm.argument(0), false));