mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 23:19:44 +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
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue