aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpu.rs')
-rw-r--r--components/script/dom/gpu.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script/dom/gpu.rs b/components/script/dom/gpu.rs
index cdac3a5a2e0..753ff82b7ab 100644
--- a/components/script/dom/gpu.rs
+++ b/components/script/dom/gpu.rs
@@ -106,9 +106,14 @@ pub fn response_async<T: AsyncWGPUListener + DomObject + 'static>(
impl GPUMethods for GPU {
// https://gpuweb.github.io/gpuweb/#dom-gpu-requestadapter
- fn RequestAdapter(&self, options: &GPURequestAdapterOptions, comp: InRealm) -> Rc<Promise> {
+ fn RequestAdapter(
+ &self,
+ options: &GPURequestAdapterOptions,
+ comp: InRealm,
+ can_gc: CanGc,
+ ) -> Rc<Promise> {
let global = &self.global();
- let promise = Promise::new_in_current_realm(comp);
+ let promise = Promise::new_in_current_realm(comp, can_gc);
let sender = response_async(&promise, self);
let power_preference = match options.powerPreference {
Some(GPUPowerPreference::Low_power) => PowerPreference::LowPower,