mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +00:00
LibWeb: Make DOMException take error message as a String
There was no need to use FlyString for error messages, and it just caused a bunch of churn since these strings typically only existed during the lifetime of the error.
This commit is contained in:
parent
5f9a36feac
commit
175f3febb8
Notes:
github-actions[bot]
2024-10-12 19:15:13 +00:00
Author: https://github.com/awesomekling
Commit: 175f3febb8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1743
Reviewed-by: https://github.com/ADKaster
89 changed files with 464 additions and 462 deletions
|
@ -29,7 +29,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<AudioNode>> AudioNode::connect(JS::NonnullG
|
|||
|
||||
// If the destination parameter is an AudioNode that has been created using another AudioContext, an InvalidAccessError MUST be thrown.
|
||||
if (m_context != destination_node->m_context) {
|
||||
return WebIDL::InvalidAccessError::create(realm(), "Cannot connect to an AudioNode in a different AudioContext"_fly_string);
|
||||
return WebIDL::InvalidAccessError::create(realm(), "Cannot connect to an AudioNode in a different AudioContext"_string);
|
||||
}
|
||||
|
||||
(void)output;
|
||||
|
@ -104,7 +104,7 @@ WebIDL::ExceptionOr<void> AudioNode::set_channel_count(WebIDL::UnsignedLong chan
|
|||
// If this value is set to zero or to a value greater than the implementation’s maximum number
|
||||
// of channels the implementation MUST throw a NotSupportedError exception.
|
||||
if (channel_count == 0 || channel_count > BaseAudioContext::MAX_NUMBER_OF_CHANNELS)
|
||||
return WebIDL::NotSupportedError::create(realm(), "Invalid channel count"_fly_string);
|
||||
return WebIDL::NotSupportedError::create(realm(), "Invalid channel count"_string);
|
||||
|
||||
m_channel_count = channel_count;
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue