diff options
author | Linus Groh <mail@linusgroh.de> | 2021-10-03 01:18:46 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-03 20:14:03 +0100 |
commit | 364dd42fc8c23655b41fd304eb878c9e1ebfd3a1 (patch) | |
tree | 479c68fac25182c096760a594f63427db52b49ec /Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp | |
parent | bb2499cd7a01225de511507e25cc0260fd64533a (diff) | |
download | serenity-364dd42fc8c23655b41fd304eb878c9e1ebfd3a1.zip |
LibJS: Convert create_data_property_or_throw() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp b/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp index 71a304166a..13968ca6bc 100644 --- a/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp +++ b/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.cpp @@ -60,17 +60,17 @@ Value from_property_descriptor(GlobalObject& global_object, Optional<PropertyDes auto& vm = global_object.vm(); auto* object = Object::create(global_object, global_object.object_prototype()); if (property_descriptor->value.has_value()) - object->create_data_property_or_throw(vm.names.value, *property_descriptor->value); + MUST(object->create_data_property_or_throw(vm.names.value, *property_descriptor->value)); if (property_descriptor->writable.has_value()) - object->create_data_property_or_throw(vm.names.writable, Value(*property_descriptor->writable)); + MUST(object->create_data_property_or_throw(vm.names.writable, Value(*property_descriptor->writable))); if (property_descriptor->get.has_value()) - object->create_data_property_or_throw(vm.names.get, *property_descriptor->get ? Value(*property_descriptor->get) : js_undefined()); + MUST(object->create_data_property_or_throw(vm.names.get, *property_descriptor->get ? Value(*property_descriptor->get) : js_undefined())); if (property_descriptor->set.has_value()) - object->create_data_property_or_throw(vm.names.set, *property_descriptor->set ? Value(*property_descriptor->set) : js_undefined()); + MUST(object->create_data_property_or_throw(vm.names.set, *property_descriptor->set ? Value(*property_descriptor->set) : js_undefined())); if (property_descriptor->enumerable.has_value()) - object->create_data_property_or_throw(vm.names.enumerable, Value(*property_descriptor->enumerable)); + MUST(object->create_data_property_or_throw(vm.names.enumerable, Value(*property_descriptor->enumerable))); if (property_descriptor->configurable.has_value()) - object->create_data_property_or_throw(vm.names.configurable, Value(*property_descriptor->configurable)); + MUST(object->create_data_property_or_throw(vm.names.configurable, Value(*property_descriptor->configurable))); return object; } |