1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibWeb: Make factory method of HTML::CanvasRenderingContext2D fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 18:48:20 +01:00 committed by Linus Groh
parent 2506666991
commit b7c488e51e
3 changed files with 4 additions and 4 deletions

View file

@ -95,7 +95,7 @@ HTMLCanvasElement::HasOrCreatedContext HTMLCanvasElement::create_2d_context()
if (!m_context.has<Empty>())
return m_context.has<JS::NonnullGCPtr<CanvasRenderingContext2D>>() ? HasOrCreatedContext::Yes : HasOrCreatedContext::No;
m_context = CanvasRenderingContext2D::create(realm(), *this);
m_context = CanvasRenderingContext2D::create(realm(), *this).release_value_but_fixme_should_propagate_errors();
return HasOrCreatedContext::Yes;
}