mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-21 07:29:53 +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
|
@ -42,7 +42,7 @@ WebIDL::ExceptionOr<GC::Ref<PannerNode>> PannerNode::construct_impl(JS::Realm& r
|
|||
// https://webaudio.github.io/web-audio-api/#dom-pannernode-coneoutergain
|
||||
// It is a linear value (not dB) in the range [0, 1]. An InvalidStateError MUST be thrown if the parameter is outside this range.
|
||||
if (options.cone_outer_gain < 0.0 || options.cone_outer_gain > 1.0)
|
||||
return WebIDL::InvalidStateError::create(realm, "coneOuterGain must be in the range of [0, 1]"_string);
|
||||
return WebIDL::InvalidStateError::create(realm, "coneOuterGain must be in the range of [0, 1]"_utf16);
|
||||
|
||||
// Create the node and allocate memory
|
||||
auto node = realm.create<PannerNode>(realm, context, options);
|
||||
|
@ -133,7 +133,7 @@ WebIDL::ExceptionOr<void> PannerNode::set_cone_outer_gain(double value)
|
|||
{
|
||||
// It is a linear value (not dB) in the range [0, 1]. An InvalidStateError MUST be thrown if the parameter is outside this range.
|
||||
if (value < 0.0 || value > 1.0)
|
||||
return WebIDL::InvalidStateError::create(realm(), "coneOuterGain must be in the range of [0, 1]"_string);
|
||||
return WebIDL::InvalidStateError::create(realm(), "coneOuterGain must be in the range of [0, 1]"_utf16);
|
||||
|
||||
m_cone_outer_gain = value;
|
||||
return {};
|
||||
|
@ -169,7 +169,7 @@ WebIDL::ExceptionOr<void> PannerNode::set_orientation(float x, float y, float z)
|
|||
WebIDL::ExceptionOr<void> PannerNode::set_channel_count_mode(Bindings::ChannelCountMode mode)
|
||||
{
|
||||
if (mode == Bindings::ChannelCountMode::Max) {
|
||||
return WebIDL::NotSupportedError::create(realm(), "PannerNode does not support 'max' as channelCountMode."_string);
|
||||
return WebIDL::NotSupportedError::create(realm(), "PannerNode does not support 'max' as channelCountMode."_utf16);
|
||||
}
|
||||
|
||||
return AudioNode::set_channel_count_mode(mode);
|
||||
|
@ -179,7 +179,7 @@ WebIDL::ExceptionOr<void> PannerNode::set_channel_count_mode(Bindings::ChannelCo
|
|||
WebIDL::ExceptionOr<void> PannerNode::set_channel_count(WebIDL::UnsignedLong channel_count)
|
||||
{
|
||||
if (channel_count > 2) {
|
||||
return WebIDL::NotSupportedError::create(realm(), "PannerNode does not support channel count greater than 2"_string);
|
||||
return WebIDL::NotSupportedError::create(realm(), "PannerNode does not support channel count greater than 2"_utf16);
|
||||
}
|
||||
|
||||
return AudioNode::set_channel_count(channel_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue