mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibWeb: Remove unecessary dependence on Window from WebGL and WebSocket
These classes only needed Window to get at its realm. Pass a realm directly to construct WebGL and WebSocket classes.
This commit is contained in:
parent
4bb6345b2f
commit
beb3519a49
9 changed files with 42 additions and 42 deletions
|
@ -97,7 +97,7 @@ JS::ThrowCompletionOr<HTMLCanvasElement::HasOrCreatedContext> HTMLCanvasElement:
|
|||
if (!m_context.has<Empty>())
|
||||
return m_context.has<JS::NonnullGCPtr<WebGL::WebGLRenderingContext>>() ? HasOrCreatedContext::Yes : HasOrCreatedContext::No;
|
||||
|
||||
auto maybe_context = TRY(WebGL::WebGLRenderingContext::create(window(), *this, options));
|
||||
auto maybe_context = TRY(WebGL::WebGLRenderingContext::create(realm(), *this, options));
|
||||
if (!maybe_context)
|
||||
return HasOrCreatedContext::No;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue