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

@ -30,7 +30,7 @@ WebIDL::ExceptionOr<GC::Ref<ChannelMergerNode>> ChannelMergerNode::construct_imp
// An IndexSizeError exception MUST be thrown if numberOfInputs is less than 1 or is greater
// than the number of supported channels.
if (options.number_of_inputs < 1 || options.number_of_inputs > BaseAudioContext::MAX_NUMBER_OF_CHANNELS)
return WebIDL::IndexSizeError::create(realm, "Invalid number of inputs"_string);
return WebIDL::IndexSizeError::create(realm, "Invalid number of inputs"_utf16);
auto node = realm.create<ChannelMergerNode>(realm, context, options);
@ -53,7 +53,7 @@ WebIDL::ExceptionOr<void> ChannelMergerNode::set_channel_count(WebIDL::UnsignedL
// The channel count cannot be changed, and an InvalidStateError exception MUST be thrown for
// any attempt to change the value.
if (channel_count != 1)
return WebIDL::InvalidStateError::create(realm(), "Channel count cannot be changed"_string);
return WebIDL::InvalidStateError::create(realm(), "Channel count cannot be changed"_utf16);
return Base::set_channel_count(channel_count);
}
@ -63,7 +63,7 @@ WebIDL::ExceptionOr<void> ChannelMergerNode::set_channel_count_mode(Bindings::Ch
// The channel count mode cannot be changed from "explicit" and an InvalidStateError exception
// MUST be thrown for any attempt to change the value.
if (channel_count_mode != Bindings::ChannelCountMode::Explicit)
return WebIDL::InvalidStateError::create(realm(), "Channel count mode cannot be changed"_string);
return WebIDL::InvalidStateError::create(realm(), "Channel count mode cannot be changed"_utf16);
return Base::set_channel_count_mode(channel_count_mode);
}