This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch geckoview-96.0.3-11.0-1 in repository tor-browser.
commit ae9ceadaf8ae1ae695397b35a2b006702dd7c5a6 Author: Nicolas Silva nsilva@mozilla.com AuthorDate: Thu Mar 10 10:41:29 2022 +0000
Bug 1758156 - Check the pref when creating PWebGPU parent actors. r=aosmond a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D140539 --- gfx/layers/ipc/ContentCompositorBridgeParent.cpp | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/gfx/layers/ipc/ContentCompositorBridgeParent.cpp b/gfx/layers/ipc/ContentCompositorBridgeParent.cpp index 9b3a641ad0e6f..03f5e68cd2411 100644 --- a/gfx/layers/ipc/ContentCompositorBridgeParent.cpp +++ b/gfx/layers/ipc/ContentCompositorBridgeParent.cpp @@ -14,6 +14,7 @@ # include "mozilla/gfx/DeviceManagerDx.h" // for DeviceManagerDx # include "mozilla/layers/ImageDataSerializer.h" #endif +#include "mozilla/StaticPrefs_dom.h" #include "mozilla/ipc/Transport.h" // for Transport #include "mozilla/layers/AnimationHelper.h" // for CompositorAnimationStorage #include "mozilla/layers/APZCTreeManagerParent.h" // for APZCTreeManagerParent @@ -206,6 +207,10 @@ bool ContentCompositorBridgeParent::DeallocPWebRenderBridgeParent( }
webgpu::PWebGPUParent* ContentCompositorBridgeParent::AllocPWebGPUParent() { + if (!StaticPrefs::dom_webgpu_enabled()) { + return nullptr; + } + webgpu::WebGPUParent* parent = new webgpu::WebGPUParent(); parent->AddRef(); // IPDL reference return parent;