From 879a590882de7e5b0a8b05b713663728d0966e56 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 21 Jan 2023 22:27:42 -0500 Subject: LibJS: Propagate OOM errors from ApplyUnicodeExtensionToTag These were missed in bff0e25ebed03db133c708a05c4f08bb5244d0ba. --- Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp index e6b002a512..f928208b78 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include @@ -110,7 +109,7 @@ static ThrowCompletionOr apply_unicode_extension_to_tag(VM& vm, S { // 1. Assert: Type(tag) is String. // 2. Assert: tag matches the unicode_locale_id production. - auto locale_id = ::Locale::parse_unicode_locale_id(tag).release_value_but_fixme_should_propagate_errors(); + auto locale_id = TRY_OR_THROW_OOM(vm, ::Locale::parse_unicode_locale_id(tag)); VERIFY(locale_id.has_value()); Vector attributes; @@ -189,7 +188,7 @@ static ThrowCompletionOr apply_unicode_extension_to_tag(VM& vm, S // iv. Else, else { // 1. Append the Record { [[Key]]: key, [[Value]]: value } to keywords. - keywords.append({ String::from_utf8(key).release_value_but_fixme_should_propagate_errors(), *value }); + keywords.append({ TRY_OR_THROW_OOM(vm, String::from_utf8(key)), *value }); } } -- cgit v1.2.3