1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibJS: Port Value::to_object() to NonnullGCPtr

This commit is contained in:
Linus Groh 2023-04-13 15:26:41 +02:00 committed by Andreas Kling
parent e79f5b6e85
commit f345f72b55
29 changed files with 264 additions and 263 deletions

View file

@ -432,7 +432,7 @@ ThrowCompletionOr<void> Object::copy_data_properties(VM& vm, Value source, HashT
if (source.is_nullish())
return {};
auto* from_object = MUST(source.to_object(vm));
auto from_object = MUST(source.to_object(vm));
for (auto& next_key_value : TRY(from_object->internal_own_property_keys())) {
auto next_key = MUST(PropertyKey::from_value(vm, next_key_value));
@ -1201,7 +1201,7 @@ ThrowCompletionOr<Object*> Object::define_properties(Value properties)
auto& vm = this->vm();
// 1. Let props be ? ToObject(Properties).
auto* props = TRY(properties.to_object(vm));
auto props = TRY(properties.to_object(vm));
// 2. Let keys be ? props.[[OwnPropertyKeys]]().
auto keys = TRY(props->internal_own_property_keys());