LibJS+LibWeb: Port interned bytecode strings to UTF-16

This was almost a no-op, except we intern JS exception messages. So the
bulk of this patch is porting exception messages to UTF-16.
This commit is contained in:
Timothy Flynn 2025-08-07 19:31:52 -04:00 committed by Jelle Raaijmakers
commit 70db474cf0
Notes: github-actions[bot] 2025-08-14 08:28:16 +00:00
162 changed files with 1405 additions and 1422 deletions

View file

@ -88,7 +88,7 @@ WebIDL::ExceptionOr<void> HTMLOptionsCollection::set_value_of_indexed_property(u
}
if (!unconverted_option.is_object() || !is<HTMLOptionElement>(unconverted_option.as_object())) {
return WebIDL::TypeMismatchError::create(realm(), "The value provided is not an HTMLOptionElement"_string);
return WebIDL::TypeMismatchError::create(realm(), "The value provided is not an HTMLOptionElement"_utf16);
}
auto& option = static_cast<HTMLOptionElement&>(unconverted_option.as_object());
@ -133,11 +133,11 @@ WebIDL::ExceptionOr<void> HTMLOptionsCollection::add(HTMLOptionOrOptGroupElement
// 1. If element is an ancestor of the select element on which the HTMLOptionsCollection is rooted, then throw a "HierarchyRequestError" DOMException.
if (resolved_element->is_ancestor_of(root()))
return WebIDL::HierarchyRequestError::create(realm(), "The provided element is an ancestor of the root select element."_string);
return WebIDL::HierarchyRequestError::create(realm(), "The provided element is an ancestor of the root select element."_utf16);
// 2. If before is an element, but that element isn't a descendant of the select element on which the HTMLOptionsCollection is rooted, then throw a "NotFoundError" DOMException.
if (before_element && !before_element->is_descendant_of(root()))
return WebIDL::NotFoundError::create(realm(), "The 'before' element is not a descendant of the root select element."_string);
return WebIDL::NotFoundError::create(realm(), "The 'before' element is not a descendant of the root select element."_utf16);
// 3. If element and before are the same element, then return.
if (before_element && (resolved_element.ptr() == before_element.ptr()))