mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Avoid accessing DOM global from XR's destructor.
This commit is contained in:
parent
fda0572a93
commit
3e95efdea6
2 changed files with 21 additions and 15 deletions
|
@ -184,7 +184,8 @@ impl NavigatorMethods for Navigator {
|
|||
|
||||
/// https://immersive-web.github.io/webxr/#dom-navigator-xr
|
||||
fn Xr(&self) -> DomRoot<XRSystem> {
|
||||
self.xr.or_init(|| XRSystem::new(&self.global()))
|
||||
self.xr
|
||||
.or_init(|| XRSystem::new(&self.global().as_window()))
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/mediacapture-main/#dom-navigator-mediadevices
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue