mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +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:
committed by
Ali Mohammad Pur
parent
38d62563b3
commit
5e1499d104
@@ -116,7 +116,7 @@ WebIDL::ExceptionOr<String> Location::href() const
|
||||
return WebIDL::SecurityError::create(realm(), "Location's relevant document is not same origin-domain with the entry settings object's origin"_fly_string);
|
||||
|
||||
// 2. Return this's url, serialized.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(url().serialize()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(url().serialize()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface:dom-location-href-2
|
||||
@@ -131,7 +131,7 @@ WebIDL::ExceptionOr<void> Location::set_href(String const& new_href)
|
||||
return {};
|
||||
|
||||
// 2. Parse the given value relative to the entry settings object. If that failed, throw a TypeError exception.
|
||||
auto href_url = window.associated_document().parse_url(new_href.to_deprecated_string());
|
||||
auto href_url = window.associated_document().parse_url(new_href.to_byte_string());
|
||||
if (!href_url.is_valid())
|
||||
return vm.throw_completion<JS::URIError>(TRY_OR_THROW_OOM(vm, String::formatted("Invalid URL '{}'", new_href)));
|
||||
|
||||
@@ -152,7 +152,7 @@ WebIDL::ExceptionOr<String> Location::origin() const
|
||||
return WebIDL::SecurityError::create(realm(), "Location's relevant document is not same origin-domain with the entry settings object's origin"_fly_string);
|
||||
|
||||
// 2. Return the serialization of this's url's origin.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(url().serialize_origin()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(url().serialize_origin()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/history.html#dom-location-protocol
|
||||
@@ -269,7 +269,7 @@ WebIDL::ExceptionOr<String> Location::pathname() const
|
||||
return WebIDL::SecurityError::create(realm(), "Location's relevant document is not same origin-domain with the entry settings object's origin"_fly_string);
|
||||
|
||||
// 2. Return the result of URL path serializing this Location object's url.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(url().serialize_path()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(url().serialize_path()));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> Location::set_pathname(String const&)
|
||||
|
||||
Reference in New Issue
Block a user