From 4eb5eb2080bbb52a5acb5b8cfc09fe1660511a64 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 13 Jan 2023 12:13:07 -0500 Subject: [PATCH] LibJS: Rename Utf16String::to_utf8 to to_deprecated_string --- Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Utf16String.cpp | 2 +- Userland/Libraries/LibJS/Runtime/Utf16String.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp b/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp index 65db0765a2..9b57954020 100644 --- a/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp +++ b/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp @@ -70,7 +70,7 @@ ThrowCompletionOr PrimitiveString::deprecated_string() const if (!has_deprecated_string()) { VERIFY(has_utf16_string()); - m_deprecated_string = TRY(m_utf16_string->to_utf8(vm())); + m_deprecated_string = TRY(m_utf16_string->to_deprecated_string(vm())); } return *m_deprecated_string; diff --git a/Userland/Libraries/LibJS/Runtime/Utf16String.cpp b/Userland/Libraries/LibJS/Runtime/Utf16String.cpp index 9f9d7f569b..505cd93fd6 100644 --- a/Userland/Libraries/LibJS/Runtime/Utf16String.cpp +++ b/Userland/Libraries/LibJS/Runtime/Utf16String.cpp @@ -102,7 +102,7 @@ Utf16View Utf16String::substring_view(size_t code_unit_offset) const return view().substring_view(code_unit_offset); } -ThrowCompletionOr Utf16String::to_utf8(VM& vm) const +ThrowCompletionOr Utf16String::to_deprecated_string(VM& vm) const { return TRY_OR_THROW_OOM(vm, view().to_deprecated_string(Utf16View::AllowInvalidCodeUnits::Yes)); } diff --git a/Userland/Libraries/LibJS/Runtime/Utf16String.h b/Userland/Libraries/LibJS/Runtime/Utf16String.h index 6b6b7d9db1..e0f7d5019a 100644 --- a/Userland/Libraries/LibJS/Runtime/Utf16String.h +++ b/Userland/Libraries/LibJS/Runtime/Utf16String.h @@ -50,7 +50,7 @@ public: Utf16View substring_view(size_t code_unit_offset, size_t code_unit_length) const; Utf16View substring_view(size_t code_unit_offset) const; - ThrowCompletionOr to_utf8(VM&) const; + ThrowCompletionOr to_deprecated_string(VM&) const; u16 code_unit_at(size_t index) const; size_t length_in_code_units() const;