mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +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
|
@ -82,9 +82,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::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#CircleElementCYAttribute
|
||||
|
@ -92,9 +92,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::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#CircleElementRAttribute
|
||||
|
@ -102,9 +102,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::r() 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.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius.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.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_radius.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue