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

@ -151,7 +151,7 @@ WebIDL::ExceptionOr<GC::Ref<HTMLTableCellElement>> HTMLTableRowElement::insert_c
// 1. If index is less than 1 or greater than the number of elements in the cells collection, then throw an "IndexSizeError" DOMException.
if (index < -1 || index > cells_collection_size)
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of cells"_string);
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of cells"_utf16);
// 2. Let table cell be the result of creating an element given this tr element's node document, "td", and the HTML namespace.
auto& table_cell = static_cast<HTMLTableCellElement&>(*TRY(DOM::create_element(document(), HTML::TagNames::td, Namespace::HTML)));
@ -176,7 +176,7 @@ WebIDL::ExceptionOr<void> HTMLTableRowElement::delete_cell(i32 index)
// 1. If index is less than 1 or greater than or equal to the number of elements in the cells collection, then throw an "IndexSizeError" DOMException.
if (index < -1 || index >= cells_collection_size)
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of cells"_string);
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of cells"_utf16);
// 2. If index is 1, then remove the last element in the cells collection from its parent, or do nothing if the cells collection is empty.
if (index == -1) {