LibWeb: Let supported_property_names() return Vector<FlyString>

Ultimately, this API should probably be replaced with something that
updates a cache on relevant DOM mutations instead of regenerating
the list of property names again and again.
This commit is contained in:
Andreas Kling 2023-12-24 20:59:00 +01:00
parent 0178929387
commit 41f56b0df9
Notes: sideshowbarker 2024-07-17 07:06:47 +09:00
19 changed files with 42 additions and 48 deletions

View file

@ -317,7 +317,7 @@ JS::ThrowCompletionOr<bool> is_named_property_exposed_on_object(Variant<Bindings
// 1. If P is not a supported property name of O, then return false.
// NOTE: This is in it's own variable to enforce the type.
Vector<String> supported_property_names = variant.visit([](auto* o) { return o->supported_property_names(); });
auto supported_property_names = variant.visit([](auto* o) { return o->supported_property_names(); });
auto property_key_string = MUST(String::from_byte_string(property_key.to_string()));
if (!supported_property_names.contains_slow(property_key_string))
return false;