mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:47:35 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -174,7 +174,7 @@ JS::ThrowCompletionOr<bool> LegacyPlatformObject::internal_set(JS::PropertyKey c
|
|||
// 2. If O implements an interface with a named property setter and Type(P) is String, then:
|
||||
if (has_named_property_setter() && property_name.is_string()) {
|
||||
// 1. Invoke the named property setter on O with P and V.
|
||||
TRY(throw_dom_exception_if_needed(vm, [&] { return invoke_named_property_setter(MUST(String::from_deprecated_string(property_name.as_string())), value); }));
|
||||
TRY(throw_dom_exception_if_needed(vm, [&] { return invoke_named_property_setter(MUST(String::from_byte_string(property_name.as_string())), value); }));
|
||||
|
||||
// 2. Return true.
|
||||
return true;
|
||||
|
@ -220,7 +220,7 @@ JS::ThrowCompletionOr<bool> LegacyPlatformObject::internal_define_own_property(J
|
|||
// 1. Let creating be true if P is not a supported property name, and false otherwise.
|
||||
// NOTE: This is in it's own variable to enforce the type.
|
||||
Vector<String> supported_property_names = this->supported_property_names();
|
||||
bool creating = !supported_property_names.contains_slow(MUST(String::from_deprecated_string(property_name_as_string)));
|
||||
bool creating = !supported_property_names.contains_slow(MUST(String::from_byte_string(property_name_as_string)));
|
||||
|
||||
// 2. If O implements an interface with the [LegacyOverrideBuiltIns] extended attribute or O does not have an own property named P, then:
|
||||
// NOTE: Own property lookup has to be done manually instead of using Object::has_own_property, as that would use the overridden internal_get_own_property.
|
||||
|
@ -236,7 +236,7 @@ JS::ThrowCompletionOr<bool> LegacyPlatformObject::internal_define_own_property(J
|
|||
return false;
|
||||
|
||||
// 2. Invoke the named property setter on O with P and Desc.[[Value]].
|
||||
TRY(throw_dom_exception_if_needed(vm, [&] { return invoke_named_property_setter(MUST(String::from_deprecated_string(property_name_as_string)), property_descriptor.value.value()); }));
|
||||
TRY(throw_dom_exception_if_needed(vm, [&] { return invoke_named_property_setter(MUST(String::from_byte_string(property_name_as_string)), property_descriptor.value.value()); }));
|
||||
|
||||
// 3. Return true.
|
||||
return true;
|
||||
|
@ -291,7 +291,7 @@ JS::ThrowCompletionOr<bool> LegacyPlatformObject::internal_delete(JS::PropertyKe
|
|||
// 4. Otherwise, operation was defined with an identifier:
|
||||
// 1. Perform method steps of operation with O as this and « P » as the argument values.
|
||||
// 2. If operation was declared with a return type of boolean and the steps returned false, then return false.
|
||||
auto did_deletion_fail = TRY(throw_dom_exception_if_needed(vm, [&] { return delete_value(MUST(String::from_deprecated_string(property_name_string))); }));
|
||||
auto did_deletion_fail = TRY(throw_dom_exception_if_needed(vm, [&] { return delete_value(MUST(String::from_byte_string(property_name_string))); }));
|
||||
if (!named_property_deleter_has_identifier())
|
||||
VERIFY(did_deletion_fail != DidDeletionFail::NotRelevant);
|
||||
|
||||
|
@ -348,7 +348,7 @@ JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> LegacyPlatformObject::interna
|
|||
// 3. If O supports named properties, then for each P of O’s supported property names that is visible according to the named property visibility algorithm, append P to keys.
|
||||
if (supports_named_properties()) {
|
||||
for (auto& named_property : supported_property_names()) {
|
||||
if (TRY(WebIDL::is_named_property_exposed_on_object({ this }, named_property.to_deprecated_string())))
|
||||
if (TRY(WebIDL::is_named_property_exposed_on_object({ this }, named_property.to_byte_string())))
|
||||
keys.append(JS::PrimitiveString::create(vm, named_property));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue