mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +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
|
@ -67,9 +67,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x1() 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_x1.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_x1.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_x1.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_x1.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#LineElementY1Attribute
|
||||
|
@ -77,9 +77,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y1() 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_y1.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_y1.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_y1.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_y1.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#LineElementX2Attribute
|
||||
|
@ -87,9 +87,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x2() 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_x2.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_x2.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_x2.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_x2.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG11/shapes.html#LineElementY2Attribute
|
||||
|
@ -97,9 +97,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y2() 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_y2.value_or(0)).release_value_but_fixme_should_propagate_errors();
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_y2.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_y2.value_or(0));
|
||||
auto anim_length = SVGLength::create(realm(), 0, m_y2.value_or(0));
|
||||
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue