aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xrtest.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/xrtest.rs')
-rw-r--r--components/script/dom/xrtest.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/script/dom/xrtest.rs b/components/script/dom/xrtest.rs
index 3c376366faf..b74d8c8bd6e 100644
--- a/components/script/dom/xrtest.rs
+++ b/components/script/dom/xrtest.rs
@@ -178,9 +178,7 @@ impl XRTestMethods for XRTest {
let mut rooted_devices: Vec<_> =
devices.iter().map(|x| DomRoot::from_ref(&**x)).collect();
devices.clear();
- for device in rooted_devices.drain(..) {
- device.disconnect(sender.clone());
- }
+
let mut trusted = Some(TrustedPromise::new(p.clone()));
let (task_source, canceller) = global
.as_window()
@@ -201,9 +199,9 @@ impl XRTestMethods for XRTest {
}),
);
- // XXXManishearth this is a hack, it will need to be replaced when
- // we improve how mock messaging works
- p.resolve_native(&())
+ for device in rooted_devices.drain(..) {
+ device.disconnect(sender.clone());
+ }
};
p
}