diff options
Diffstat (limited to 'components/script/dom/gpudevice.rs')
-rw-r--r-- | components/script/dom/gpudevice.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/gpudevice.rs b/components/script/dom/gpudevice.rs index fb6fad7efb4..5ea21eac5de 100644 --- a/components/script/dom/gpudevice.rs +++ b/components/script/dom/gpudevice.rs @@ -357,7 +357,7 @@ impl GPUDeviceMethods for GPUDevice { /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-lost fn Lost(&self, comp: InRealm) -> Rc<Promise> { - let promise = Promise::new_in_current_realm(&self.global(), comp); + let promise = Promise::new_in_current_realm(comp); *self.lost_promise.borrow_mut() = Some(promise.clone()); promise } @@ -1117,7 +1117,7 @@ impl GPUDeviceMethods for GPUDevice { /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-poperrorscope fn PopErrorScope(&self, comp: InRealm) -> Rc<Promise> { let mut context = self.scope_context.borrow_mut(); - let promise = Promise::new_in_current_realm(&self.global(), comp); + let promise = Promise::new_in_current_realm(comp); let scope_id = if let Some(meta) = context.scope_stack.iter().rev().find(|m| !m.popped.get()) { meta.popped.set(true); |