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/PromiseResolvingElementFunctions.cpp | |
parent | bb2499cd7a01225de511507e25cc0260fd64533a (diff) | |
download | serenity-364dd42fc8c23655b41fd304eb878c9e1ebfd3a1.zip |
LibJS: Convert create_data_property_or_throw() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp index 83dd7cd8c2..e98278f2fa 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp +++ b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp @@ -89,8 +89,8 @@ Value PromiseAllSettledResolveElementFunction::resolve_element() auto& global_object = this->global_object(); auto* object = Object::create(global_object, global_object.object_prototype()); - object->create_data_property_or_throw(vm.names.status, js_string(vm, "fulfilled"sv)); - object->create_data_property_or_throw(vm.names.value, vm.argument(0)); + MUST(object->create_data_property_or_throw(vm.names.status, js_string(vm, "fulfilled"sv))); + MUST(object->create_data_property_or_throw(vm.names.value, vm.argument(0))); m_values.values()[m_index] = object; @@ -118,8 +118,8 @@ Value PromiseAllSettledRejectElementFunction::resolve_element() auto& global_object = this->global_object(); auto* object = Object::create(global_object, global_object.object_prototype()); - object->create_data_property_or_throw(vm.names.status, js_string(vm, "rejected"sv)); - object->create_data_property_or_throw(vm.names.reason, vm.argument(0)); + MUST(object->create_data_property_or_throw(vm.names.status, js_string(vm, "rejected"sv))); + MUST(object->create_data_property_or_throw(vm.names.reason, vm.argument(0))); m_values.values()[m_index] = object; |