1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:35:06 +00:00

LibGfx+LibWeb: Propagate OOM when creating PaintStyles

This commit is contained in:
MacDue 2023-03-01 23:01:59 +00:00 committed by Andreas Kling
parent f0a99634dd
commit 3a0a7e3e96
5 changed files with 21 additions and 21 deletions

View file

@ -125,7 +125,7 @@ WebIDL::ExceptionOr<JS::GCPtr<CanvasPattern>> CanvasPattern::create(JS::Realm& r
auto const& bitmap = *image.visit([](auto const& source) -> Gfx::Bitmap const* { return source->bitmap(); });
// 6. Let pattern be a new CanvasPattern object with the image image and the repetition behavior given by repetition.
auto pattern = CanvasPatternPaintStyle::create(bitmap, *repetition_value);
auto pattern = TRY_OR_THROW_OOM(realm.vm(), CanvasPatternPaintStyle::create(bitmap, *repetition_value));
// FIXME: 7. If image is not origin-clean, then mark pattern as not origin-clean.