mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibGfx+LibWeb: Propagate OOM when appending CanvasGradient color stops
This commit is contained in:
@@ -70,7 +70,7 @@ WebIDL::ExceptionOr<void> CanvasGradient::add_color_stop(double offset, Deprecat
|
||||
return WebIDL::SyntaxError::create(realm(), "Could not parse color for CanvasGradient");
|
||||
|
||||
// 4. Place a new stop on the gradient, at offset offset relative to the whole gradient, and with the color parsed color.
|
||||
m_gradient->add_color_stop(offset, parsed_color.value());
|
||||
TRY_OR_THROW_OOM(realm().vm(), m_gradient->add_color_stop(offset, parsed_color.value()));
|
||||
|
||||
// FIXME: If multiple stops are added at the same offset on a gradient, then they must be placed in the order added,
|
||||
// with the first one closest to the start of the gradient, and each subsequent one infinitesimally further along
|
||||
|
||||
Reference in New Issue
Block a user