diff options
Diffstat (limited to 'dom/webgpu/ComputePipeline.cpp')
-rw-r--r-- | dom/webgpu/ComputePipeline.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dom/webgpu/ComputePipeline.cpp b/dom/webgpu/ComputePipeline.cpp index ecd43289f3..759d8e16db 100644 --- a/dom/webgpu/ComputePipeline.cpp +++ b/dom/webgpu/ComputePipeline.cpp @@ -27,12 +27,16 @@ ComputePipeline::ComputePipeline(Device* const aParent, RawId aId, ComputePipeline::~ComputePipeline() { Cleanup(); } void ComputePipeline::Cleanup() { - if (mValid) { + if (!mValid) { return; } mValid = false; auto bridge = mParent->GetBridge(); + if (!bridge) { + return; + } + if (bridge->CanSend()) { bridge->SendComputePipelineDrop(mId); if (mImplicitPipelineLayoutId) { @@ -54,6 +58,7 @@ void ComputePipeline::Cleanup() { already_AddRefed<BindGroupLayout> ComputePipeline::GetBindGroupLayout( uint32_t aIndex) const { auto bridge = mParent->GetBridge(); + MOZ_ASSERT(bridge && bridge->CanSend()); auto* client = bridge->GetClient(); ipc::ByteBuf bb; |