diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-31 17:00:07 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-31 18:20:37 +0200 |
commit | bcf168f771e1a0fad315d3433ec2b5d071efe5da (patch) | |
tree | 8b652ecbd0c75c43fa835e2ab606337a371f2066 /Userland/Libraries/LibJS/Runtime | |
parent | aa61110bdd6220d92d834b39f5856fb93d52c8a0 (diff) | |
download | serenity-bcf168f771e1a0fad315d3433ec2b5d071efe5da.zip |
LibJS: Use ThrowCompletionOr accessors in CreateMappedArgumentsObject
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp index f01682dfb3..3498569131 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp @@ -846,9 +846,9 @@ Object* create_mapped_arguments_object(GlobalObject& global_object, FunctionObje // 1. Let g be MakeArgGetter(name, env). // 2. Let p be MakeArgSetter(name, env). // 3. Perform map.[[DefineOwnProperty]](! ToString(𝔽(index)), PropertyDescriptor { [[Set]]: p, [[Get]]: g, [[Enumerable]]: false, [[Configurable]]: true }). - object->parameter_map().define_old_native_accessor( + object->parameter_map().define_native_accessor( PropertyKey { index }, - [&environment, name](VM&, GlobalObject& global_object_getter) -> Value { + [&environment, name](VM&, GlobalObject& global_object_getter) -> JS::ThrowCompletionOr<Value> { return MUST(environment.get_binding_value(global_object_getter, name, false)); }, [&environment, name](VM& vm, GlobalObject& global_object_setter) { |