mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 12:37:40 +00:00
LibWeb: Use StringView in calls to Vector<String>::contains_slow()
This commit is contained in:
parent
9663ccff77
commit
fdb27c5851
2 changed files with 3 additions and 3 deletions
|
@ -56,7 +56,7 @@ ErrorOr<bool> tao_check(Infrastructure::Request const& request, Infrastructure::
|
||||||
auto values = TRY(response.header_list()->get_decode_and_split("Timing-Allow-Origin"sv.bytes()));
|
auto values = TRY(response.header_list()->get_decode_and_split("Timing-Allow-Origin"sv.bytes()));
|
||||||
|
|
||||||
// 3. If values contains "*", then return success.
|
// 3. If values contains "*", then return success.
|
||||||
if (values.has_value() && values->contains_slow("*"_string))
|
if (values.has_value() && values->contains_slow("*"sv))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// 4. If values contains the result of serializing a request origin with request, then return success.
|
// 4. If values contains the result of serializing a request origin with request, then return success.
|
||||||
|
|
|
@ -224,10 +224,10 @@ JS::ThrowCompletionOr<void> CustomElementRegistry::define(String const& name, We
|
||||||
disabled_features = TRY(convert_value_to_sequence_of_strings(vm, disabled_features_iterable));
|
disabled_features = TRY(convert_value_to_sequence_of_strings(vm, disabled_features_iterable));
|
||||||
|
|
||||||
// 9. Set disableInternals to true if disabledFeatures contains "internals".
|
// 9. Set disableInternals to true if disabledFeatures contains "internals".
|
||||||
disable_internals = disabled_features.contains_slow("internals"_string);
|
disable_internals = disabled_features.contains_slow("internals"sv);
|
||||||
|
|
||||||
// 10. Set disableShadow to true if disabledFeatures contains "shadow".
|
// 10. Set disableShadow to true if disabledFeatures contains "shadow".
|
||||||
disable_shadow = disabled_features.contains_slow("shadow"_string);
|
disable_shadow = disabled_features.contains_slow("shadow"sv);
|
||||||
|
|
||||||
// 11. Let formAssociatedValue be ? Get( constructor, "formAssociated").
|
// 11. Let formAssociatedValue be ? Get( constructor, "formAssociated").
|
||||||
auto form_associated_value = TRY(constructor->callback->get(JS::PropertyKey { "formAssociated" }));
|
auto form_associated_value = TRY(constructor->callback->get(JS::PropertyKey { "formAssociated" }));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue