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
commit b7c488e51e
Notes: sideshowbarker 2024-07-17 03:51:15 +09:00
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;
}