mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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
|
@ -72,7 +72,7 @@ FontFaceSet::add(JS::Handle<FontFace> face)
|
|||
|
||||
// 2. If font is CSS-connected, throw an InvalidModificationError exception and exit this algorithm immediately.
|
||||
if (face->is_css_connected()) {
|
||||
return WebIDL::InvalidModificationError::create(realm(), "Cannot add a CSS-connected FontFace to a FontFaceSet"_fly_string);
|
||||
return WebIDL::InvalidModificationError::create(realm(), "Cannot add a CSS-connected FontFace to a FontFaceSet"_string);
|
||||
}
|
||||
|
||||
// 3. Add the font argument to the FontFaceSet’s set entries.
|
||||
|
@ -166,7 +166,7 @@ WebIDL::CallbackType* FontFaceSet::onloadingerror()
|
|||
JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Promise>> FontFaceSet::load(String const&, String const&)
|
||||
{
|
||||
// FIXME: Do the steps
|
||||
auto promise = WebIDL::create_rejected_promise(realm(), WebIDL::NotSupportedError::create(realm(), "FontFaceSet::load is not yet implemented"_fly_string));
|
||||
auto promise = WebIDL::create_rejected_promise(realm(), WebIDL::NotSupportedError::create(realm(), "FontFaceSet::load is not yet implemented"_string));
|
||||
return verify_cast<JS::Promise>(*promise->promise());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue