mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 09:06:08 +00:00
LibJS: Convert Array::create{,_from}() to NonnullGCPtr
This commit is contained in:
parent
0c50751c13
commit
91b0123eaf
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/linusg
Commit: 91b0123eaf
Pull-request: https://github.com/SerenityOS/serenity/pull/16479
Reviewed-by: https://github.com/davidot ✅
25 changed files with 60 additions and 60 deletions
|
@ -109,7 +109,7 @@ JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalEnvironmentExtensions::$$_function)
|
|||
return element->query_selector_all(selector);
|
||||
}));
|
||||
|
||||
auto* array = TRY(JS::Array::create(*vm.current_realm(), node_list->length()));
|
||||
auto array = TRY(JS::Array::create(*vm.current_realm(), node_list->length()));
|
||||
for (auto i = 0u; i < node_list->length(); ++i) {
|
||||
TRY(array->create_data_property_or_throw(i, node_list->item_value(i)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue