mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 00:09:01 +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
Notes:
sideshowbarker
2024-07-16 23:38:54 +09:00
Author: https://github.com/alimpfard
Commit: 5e1499d104
Pull-request: https://github.com/SerenityOS/serenity/pull/22325
1615 changed files with 10257 additions and 10257 deletions
|
@ -17,20 +17,20 @@ JS_DEFINE_ALLOCATOR(JavaScriptModuleScript);
|
|||
|
||||
ModuleScript::~ModuleScript() = default;
|
||||
|
||||
ModuleScript::ModuleScript(AK::URL base_url, DeprecatedString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
ModuleScript::ModuleScript(AK::URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
: Script(move(base_url), move(filename), environment_settings_object)
|
||||
{
|
||||
}
|
||||
|
||||
JavaScriptModuleScript::~JavaScriptModuleScript() = default;
|
||||
|
||||
JavaScriptModuleScript::JavaScriptModuleScript(AK::URL base_url, DeprecatedString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
JavaScriptModuleScript::JavaScriptModuleScript(AK::URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
: ModuleScript(move(base_url), move(filename), environment_settings_object)
|
||||
{
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#creating-a-javascript-module-script
|
||||
WebIDL::ExceptionOr<JS::GCPtr<JavaScriptModuleScript>> JavaScriptModuleScript::create(DeprecatedString const& filename, StringView source, EnvironmentSettingsObject& settings_object, AK::URL base_url)
|
||||
WebIDL::ExceptionOr<JS::GCPtr<JavaScriptModuleScript>> JavaScriptModuleScript::create(ByteString const& filename, StringView source, EnvironmentSettingsObject& settings_object, AK::URL base_url)
|
||||
{
|
||||
// 1. If scripting is disabled for settings, then set source to the empty string.
|
||||
if (settings_object.is_scripting_disabled())
|
||||
|
@ -59,7 +59,7 @@ WebIDL::ExceptionOr<JS::GCPtr<JavaScriptModuleScript>> JavaScriptModuleScript::c
|
|||
// 8. If result is a list of errors, then:
|
||||
if (result.is_error()) {
|
||||
auto& parse_error = result.error().first();
|
||||
dbgln("JavaScriptModuleScript: Failed to parse: {}", parse_error.to_deprecated_string());
|
||||
dbgln("JavaScriptModuleScript: Failed to parse: {}", parse_error.to_byte_string());
|
||||
|
||||
// 1. Set script's parse error to result[0].
|
||||
script->set_parse_error(JS::SyntaxError::create(settings_object.realm(), parse_error.to_string().release_value_but_fixme_should_propagate_errors()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue