1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibJS: Convert Object::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
parent f990095728
commit ddc6e139a6
45 changed files with 80 additions and 80 deletions

View file

@ -101,7 +101,7 @@ ThrowCompletionOr<Value> PromiseAllSettledResolveElementFunction::resolve_elemen
auto& realm = *vm.current_realm();
// 9. Let obj be OrdinaryObjectCreate(%Object.prototype%).
auto* object = Object::create(realm, realm.intrinsics().object_prototype());
auto object = Object::create(realm, realm.intrinsics().object_prototype());
// 10. Perform ! CreateDataPropertyOrThrow(obj, "status", "fulfilled").
MUST(object->create_data_property_or_throw(vm.names.status, PrimitiveString::create(vm, "fulfilled"sv)));
@ -142,7 +142,7 @@ ThrowCompletionOr<Value> PromiseAllSettledRejectElementFunction::resolve_element
auto& realm = *vm.current_realm();
// 9. Let obj be OrdinaryObjectCreate(%Object.prototype%).
auto* object = Object::create(realm, realm.intrinsics().object_prototype());
auto object = Object::create(realm, realm.intrinsics().object_prototype());
// 10. Perform ! CreateDataPropertyOrThrow(obj, "status", "rejected").
MUST(object->create_data_property_or_throw(vm.names.status, PrimitiveString::create(vm, "rejected"sv)));