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

LibWeb: Make factory method of HTML::Path2D fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 19:24:06 +01:00 committed by Linus Groh
parent 2b391ea622
commit 86b7f148b9
2 changed files with 3 additions and 3 deletions

View file

@ -12,9 +12,9 @@
namespace Web::HTML {
JS::NonnullGCPtr<Path2D> Path2D::construct_impl(JS::Realm& realm, Optional<Variant<JS::Handle<Path2D>, DeprecatedString>> const& path)
WebIDL::ExceptionOr<JS::NonnullGCPtr<Path2D>> Path2D::construct_impl(JS::Realm& realm, Optional<Variant<JS::Handle<Path2D>, DeprecatedString>> const& path)
{
return realm.heap().allocate<Path2D>(realm, realm, path).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<Path2D>(realm, realm, path));
}
// https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d