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
parent cf61171864
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

@@ -72,13 +72,13 @@ WebIDL::ExceptionOr<void> AudioDestinationNode::set_channel_count(WebIDL::Unsign
// exception MUST be thrown for any attempt to set the count outside this range.
if (is<AudioContext>(*context())) {
if (channel_count < 1 || channel_count > max_channel_count())
return WebIDL::IndexSizeError::create(realm(), "Channel index is out of range"_string);
return WebIDL::IndexSizeError::create(realm(), "Channel index is out of range"_utf16);
}
// OfflineAudioContext: The channel count cannot be changed. An InvalidStateError exception MUST
// be thrown for any attempt to change the value.
if (is<OfflineAudioContext>(*context()))
return WebIDL::InvalidStateError::create(realm(), "Cannot change channel count in an OfflineAudioContext"_string);
return WebIDL::InvalidStateError::create(realm(), "Cannot change channel count in an OfflineAudioContext"_utf16);
return AudioNode::set_channel_count(channel_count);
}