mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
02199520f2
commit
b0b0289014
74 changed files with 403 additions and 275 deletions
|
@ -369,10 +369,10 @@ impl GPUDevice {
|
|||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#lose-the-device>
|
||||
pub(crate) fn lose(&self, reason: GPUDeviceLostReason, msg: String) {
|
||||
pub(crate) fn lose(&self, reason: GPUDeviceLostReason, msg: String, can_gc: CanGc) {
|
||||
let lost_promise = &(*self.lost_promise.borrow());
|
||||
let global = &self.global();
|
||||
let lost = GPUDeviceLostInfo::new(global, msg.into(), reason, CanGc::note());
|
||||
let lost = GPUDeviceLostInfo::new(global, msg.into(), reason, can_gc);
|
||||
lost_promise.resolve_native(&*lost);
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ impl GPUDeviceMethods<crate::DomTypeHolder> for GPUDevice {
|
|||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createbuffer>
|
||||
fn CreateBuffer(&self, descriptor: &GPUBufferDescriptor) -> Fallible<DomRoot<GPUBuffer>> {
|
||||
GPUBuffer::create(self, descriptor)
|
||||
GPUBuffer::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#GPUDevice-createBindGroupLayout>
|
||||
|
@ -419,7 +419,7 @@ impl GPUDeviceMethods<crate::DomTypeHolder> for GPUDevice {
|
|||
&self,
|
||||
descriptor: &GPUBindGroupLayoutDescriptor,
|
||||
) -> Fallible<DomRoot<GPUBindGroupLayout>> {
|
||||
GPUBindGroupLayout::create(self, descriptor)
|
||||
GPUBindGroupLayout::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createpipelinelayout>
|
||||
|
@ -427,12 +427,12 @@ impl GPUDeviceMethods<crate::DomTypeHolder> for GPUDevice {
|
|||
&self,
|
||||
descriptor: &GPUPipelineLayoutDescriptor,
|
||||
) -> DomRoot<GPUPipelineLayout> {
|
||||
GPUPipelineLayout::create(self, descriptor)
|
||||
GPUPipelineLayout::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createbindgroup>
|
||||
fn CreateBindGroup(&self, descriptor: &GPUBindGroupDescriptor) -> DomRoot<GPUBindGroup> {
|
||||
GPUBindGroup::create(self, descriptor)
|
||||
GPUBindGroup::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createshadermodule>
|
||||
|
@ -478,17 +478,17 @@ impl GPUDeviceMethods<crate::DomTypeHolder> for GPUDevice {
|
|||
&self,
|
||||
descriptor: &GPUCommandEncoderDescriptor,
|
||||
) -> DomRoot<GPUCommandEncoder> {
|
||||
GPUCommandEncoder::create(self, descriptor)
|
||||
GPUCommandEncoder::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createtexture>
|
||||
fn CreateTexture(&self, descriptor: &GPUTextureDescriptor) -> Fallible<DomRoot<GPUTexture>> {
|
||||
GPUTexture::create(self, descriptor)
|
||||
GPUTexture::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createsampler>
|
||||
fn CreateSampler(&self, descriptor: &GPUSamplerDescriptor) -> DomRoot<GPUSampler> {
|
||||
GPUSampler::create(self, descriptor)
|
||||
GPUSampler::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline>
|
||||
|
@ -526,7 +526,7 @@ impl GPUDeviceMethods<crate::DomTypeHolder> for GPUDevice {
|
|||
&self,
|
||||
descriptor: &GPURenderBundleEncoderDescriptor,
|
||||
) -> Fallible<DomRoot<GPURenderBundleEncoder>> {
|
||||
GPURenderBundleEncoder::create(self, descriptor)
|
||||
GPURenderBundleEncoder::create(self, descriptor, CanGc::note())
|
||||
}
|
||||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-pusherrorscope>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue