1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibJS: Convert create_data_property_or_throw() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 01:18:46 +01:00
parent bb2499cd7a
commit 364dd42fc8
30 changed files with 148 additions and 167 deletions

View file

@ -248,13 +248,13 @@ Array* format_list_to_parts(GlobalObject& global_object, ListFormat const& list_
auto* object = Object::create(global_object, global_object.object_prototype());
// b. Perform ! CreateDataPropertyOrThrow(O, "type", part.[[Type]]).
object->create_data_property_or_throw(vm.names.type, js_string(vm, part.type));
MUST(object->create_data_property_or_throw(vm.names.type, js_string(vm, part.type)));
// c. Perform ! CreateDataPropertyOrThrow(O, "value", part.[[Value]]).
object->create_data_property_or_throw(vm.names.value, js_string(vm, part.value));
MUST(object->create_data_property_or_throw(vm.names.value, js_string(vm, part.value)));
// d. Perform ! CreateDataPropertyOrThrow(result, ! ToString(n), O).
result->create_data_property_or_throw(n, object);
MUST(result->create_data_property_or_throw(n, object));
// e. Increment n by 1.
++n;