1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06: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

@ -339,7 +339,7 @@ Vector<PatternPartition> partition_duration_format_pattern(VM& vm, DurationForma
auto value = duration.*value_slot;
// i. Let nfOpts be ! OrdinaryObjectCreate(null).
auto* number_format_options = Object::create(realm, nullptr);
auto number_format_options = Object::create(realm, nullptr);
// j. If unit is "seconds", "milliseconds", or "microseconds", then
if (unit.is_one_of("seconds"sv, "milliseconds"sv, "microseconds"sv)) {
@ -486,7 +486,7 @@ Vector<PatternPartition> partition_duration_format_pattern(VM& vm, DurationForma
}
// 4. Let lfOpts be ! OrdinaryObjectCreate(null).
auto* list_format_options = Object::create(realm, nullptr);
auto list_format_options = Object::create(realm, nullptr);
// 5. Perform ! CreateDataPropertyOrThrow(lfOpts, "type", "unit").
MUST(list_format_options->create_data_property_or_throw(vm.names.type, PrimitiveString::create(vm, "unit"sv)));