1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

LibWeb: Port supported property names from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-11-21 07:39:58 +13:00 committed by Tim Flynn
parent 66ac0d88a3
commit 629f661e3b
19 changed files with 59 additions and 59 deletions

View file

@ -1563,7 +1563,7 @@ OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_
}
// https://html.spec.whatwg.org/#named-access-on-the-window-object
Vector<DeprecatedString> Window::supported_property_names()
Vector<String> Window::supported_property_names()
{
// The Window object supports named properties.
// The supported property names of a Window object window at any moment consist of the following,
@ -1590,12 +1590,12 @@ Vector<DeprecatedString> Window::supported_property_names()
return IterationDecision::Continue;
});
// FIXME: Many copies here. Would be nice to be able to return Vector<String>
Vector<DeprecatedString> names;
Vector<String> names;
names.ensure_capacity(property_names.size());
for (auto const& name : property_names) {
names.append(name.to_deprecated_string());
names.append(name);
}
return names;
}