mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 06:00:27 +00:00
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:
parent
cf61171864
commit
70db474cf0
Notes:
github-actions[bot]
2025-08-14 08:28:16 +00:00
Author: https://github.com/trflynn89
Commit: 70db474cf0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5845
Reviewed-by: https://github.com/gmta ✅
162 changed files with 1405 additions and 1422 deletions
|
@ -147,7 +147,7 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(String c
|
|||
if (current_character == '-' && character_index + 1 < name_view.length()) {
|
||||
auto next_character = name_view[character_index + 1];
|
||||
if (is_ascii_lower_alpha(next_character))
|
||||
return WebIDL::SyntaxError::create(realm(), "Name cannot contain a '-' followed by a lowercase character."_string);
|
||||
return WebIDL::SyntaxError::create(realm(), "Name cannot contain a '-' followed by a lowercase character."_utf16);
|
||||
}
|
||||
|
||||
// 2. For each ASCII upper alpha in name, insert a U+002D HYPHEN-MINUS character (-) before the character and replace the character with the same character converted to ASCII lowercase.
|
||||
|
@ -164,7 +164,7 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(String c
|
|||
|
||||
// 4. If name is not a valid attribute local name, then throw an "InvalidCharacterError" DOMException.
|
||||
if (!DOM::is_valid_attribute_local_name(data_name))
|
||||
return WebIDL::InvalidCharacterError::create(realm(), "Name is not a valid attribute local name."_string);
|
||||
return WebIDL::InvalidCharacterError::create(realm(), "Name is not a valid attribute local name."_utf16);
|
||||
|
||||
// 5. Set an attribute value for the DOMStringMap's associated element using name and value.
|
||||
TRY(m_associated_element->set_attribute(data_name, value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue