1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibWeb: Make factory method of SVG::SVGAnimatedLength fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 08:43:44 +01:00 committed by Linus Groh
parent 200d22c650
commit 63b69f3672
7 changed files with 35 additions and 24 deletions

View file

@ -9,9 +9,9 @@
namespace Web::SVG {
JS::NonnullGCPtr<SVGAnimatedLength> SVGAnimatedLength::create(JS::Realm& realm, JS::NonnullGCPtr<SVGLength> base_val, JS::NonnullGCPtr<SVGLength> anim_val)
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGAnimatedLength>> SVGAnimatedLength::create(JS::Realm& realm, JS::NonnullGCPtr<SVGLength> base_val, JS::NonnullGCPtr<SVGLength> anim_val)
{
return realm.heap().allocate<SVGAnimatedLength>(realm, realm, move(base_val), move(anim_val)).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<SVGAnimatedLength>(realm, realm, move(base_val), move(anim_val)));
}
SVGAnimatedLength::SVGAnimatedLength(JS::Realm& realm, JS::NonnullGCPtr<SVGLength> base_val, JS::NonnullGCPtr<SVGLength> anim_val)