mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449. While going through these, I also changed the function signature in many places where returning ThrowCompletionOr<T> is no longer necessary.
This commit is contained in:
parent
980e7164fe
commit
72c9f56c66
337 changed files with 1229 additions and 1251 deletions
|
@ -87,9 +87,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::cx() const
|
|||
{
|
||||
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
|
||||
// FIXME: Create a proper animated value when animations are supported.
|
||||
auto base_length = SVGLength::create(realm(), 0, m_center_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_center_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
|
||||
auto base_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementCYAttribute
|
||||
|
@ -97,9 +97,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::cy() const
|
|||
{
|
||||
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
|
||||
// FIXME: Create a proper animated value when animations are supported.
|
||||
auto base_length = SVGLength::create(realm(), 0, m_center_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_center_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
|
||||
auto base_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute
|
||||
|
@ -107,9 +107,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::rx() const
|
|||
{
|
||||
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
|
||||
// FIXME: Create a proper animated value when animations are supported.
|
||||
auto base_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
|
||||
auto base_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute
|
||||
|
@ -117,9 +117,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::ry() const
|
|||
{
|
||||
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
|
||||
// FIXME: Create a proper animated value when animations are supported.
|
||||
auto base_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
|
||||
auto base_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue