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

LibWeb: Make factory method of SVG::SVGLength fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 20:25:50 +01:00 committed by Linus Groh
parent bfc8cbcf3b
commit 71316614b8
7 changed files with 45 additions and 45 deletions

View file

@ -9,9 +9,9 @@
namespace Web::SVG {
JS::NonnullGCPtr<SVGLength> SVGLength::create(JS::Realm& realm, u8 unit_type, float value)
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGLength>> SVGLength::create(JS::Realm& realm, u8 unit_type, float value)
{
return realm.heap().allocate<SVGLength>(realm, realm, unit_type, value).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<SVGLength>(realm, realm, unit_type, value));
}
SVGLength::SVGLength(JS::Realm& realm, u8 unit_type, float value)