Skip to content

Commit

Permalink
[WebGPU] Disable getContext("webgpu") when WebGPU is disabled
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=256533
rdar://109106604

Reviewed by Mike Wyrzykowski, Dan Glastonbury and Tadeu Zagallo.

navigator.gpu is disabled, but getContext("webgpu") isn't.

* Source/WebCore/page/Navigator.cpp:
(WebCore::Navigator::gpu):

Canonical link: https://commits.webkit.org/263877@main
  • Loading branch information
litherum committed May 9, 2023
1 parent 3894e0d commit 48a5372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/WebCore/page/Navigator.cpp
Expand Up @@ -366,6 +366,8 @@ GPU* Navigator::gpu()
auto* frame = this->frame();
if (!frame)
return nullptr;
if (!frame->settings().webGPU())
return nullptr;
auto* page = frame->page();
if (!page)
return nullptr;
Expand Down

0 comments on commit 48a5372

Please sign in to comment.