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

LibJS: Convert Array::create{,_from}() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:49 +00:00
parent 0c50751c13
commit 91b0123eaf
25 changed files with 60 additions and 60 deletions

View file

@ -441,7 +441,7 @@ Object* JSONObject::parse_json_object(VM& vm, JsonObject const& json_object)
Array* JSONObject::parse_json_array(VM& vm, JsonArray const& json_array)
{
auto& realm = *vm.current_realm();
auto* array = MUST(Array::create(realm, 0));
auto array = MUST(Array::create(realm, 0));
size_t index = 0;
json_array.for_each([&](auto& value) {
array->define_direct_property(index++, parse_json_value(vm, value), default_attributes);