aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpudevice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpudevice.rs')
-rw-r--r--components/script/dom/gpudevice.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/components/script/dom/gpudevice.rs b/components/script/dom/gpudevice.rs
index 840f6991292..51361118f8d 100644
--- a/components/script/dom/gpudevice.rs
+++ b/components/script/dom/gpudevice.rs
@@ -153,7 +153,7 @@ impl GPUDevice {
let queue = GPUQueue::new(global, channel.clone(), queue);
let limits = GPUSupportedLimits::new(global, limits);
let features = GPUSupportedFeatures::Constructor(global, None, features, can_gc).unwrap();
- let lost_promise = Promise::new(global);
+ let lost_promise = Promise::new(global, can_gc);
let device = reflect_dom_object(
Box::new(GPUDevice::new_inherited(
channel,
@@ -440,8 +440,9 @@ impl GPUDeviceMethods for GPUDevice {
&self,
descriptor: RootedTraceableBox<GPUShaderModuleDescriptor>,
comp: InRealm,
+ can_gc: CanGc,
) -> DomRoot<GPUShaderModule> {
- GPUShaderModule::create(self, descriptor, comp)
+ GPUShaderModule::create(self, descriptor, comp, can_gc)
}
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcomputepipeline>
@@ -463,8 +464,9 @@ impl GPUDeviceMethods for GPUDevice {
&self,
descriptor: &GPUComputePipelineDescriptor,
comp: InRealm,
+ can_gc: CanGc,
) -> Rc<Promise> {
- let promise = Promise::new_in_current_realm(comp);
+ let promise = Promise::new_in_current_realm(comp, can_gc);
let sender = response_async(&promise, self);
GPUComputePipeline::create(self, descriptor, Some(sender));
promise
@@ -508,9 +510,10 @@ impl GPUDeviceMethods for GPUDevice {
&self,
descriptor: &GPURenderPipelineDescriptor,
comp: InRealm,
+ can_gc: CanGc,
) -> Fallible<Rc<Promise>> {
let (implicit_ids, desc) = self.parse_render_pipeline(descriptor)?;
- let promise = Promise::new_in_current_realm(comp);
+ let promise = Promise::new_in_current_realm(comp, can_gc);
let sender = response_async(&promise, self);
GPURenderPipeline::create(self, implicit_ids, desc, Some(sender))?;
Ok(promise)
@@ -540,8 +543,8 @@ impl GPUDeviceMethods for GPUDevice {
}
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-poperrorscope>
- fn PopErrorScope(&self, comp: InRealm) -> Rc<Promise> {
- let promise = Promise::new_in_current_realm(comp);
+ fn PopErrorScope(&self, comp: InRealm, can_gc: CanGc) -> Rc<Promise> {
+ let promise = Promise::new_in_current_realm(comp, can_gc);
let sender = response_async(&promise, self);
if self
.channel