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

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -5,7 +5,7 @@
*/
#include <AK/Base64.h>
#include <AK/String.h>
#include <AK/DeprecatedString.h>
#include <AK/Utf8View.h>
#include <AK/Vector.h>
#include <LibTextCodec/Decoder.h>
@ -43,7 +43,7 @@ void WorkerGlobalScope::visit_edges(Cell::Visitor& visitor)
}
// https://html.spec.whatwg.org/multipage/workers.html#importing-scripts-and-libraries
WebIDL::ExceptionOr<void> WorkerGlobalScope::import_scripts(Vector<String> urls)
WebIDL::ExceptionOr<void> WorkerGlobalScope::import_scripts(Vector<DeprecatedString> urls)
{
// The algorithm may optionally be customized by supplying custom perform the fetch hooks,
// which if provided will be used when invoking fetch a classic worker-imported script.
@ -98,7 +98,7 @@ ENUMERATE_WORKER_GLOBAL_SCOPE_EVENT_HANDLERS(__ENUMERATE)
#undef __ENUMERATE
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin
String WorkerGlobalScope::origin() const
DeprecatedString WorkerGlobalScope::origin() const
{
// FIXME: The origin getter steps are to return this's relevant settings object's origin, serialized.
return {};
@ -121,7 +121,7 @@ bool WorkerGlobalScope::cross_origin_isolated() const
}
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa
WebIDL::ExceptionOr<String> WorkerGlobalScope::btoa(String const& data) const
WebIDL::ExceptionOr<DeprecatedString> WorkerGlobalScope::btoa(DeprecatedString const& data) const
{
// FIXME: This is the same as the implementation in Bindings/WindowObject.cpp
// Find a way to share this implementation, since they come from the same mixin.
@ -141,7 +141,7 @@ WebIDL::ExceptionOr<String> WorkerGlobalScope::btoa(String const& data) const
}
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-atob
WebIDL::ExceptionOr<String> WorkerGlobalScope::atob(String const& data) const
WebIDL::ExceptionOr<DeprecatedString> WorkerGlobalScope::atob(DeprecatedString const& data) const
{
// FIXME: This is the same as the implementation in Bindings/WindowObject.cpp
// Find a way to share this implementation, since they come from the same mixin.