Gate reference space creation on requested features

This commit is contained in:
Manish Goregaokar 2020-01-14 18:09:28 +05:30
parent 8cc7c51803
commit 9a04a37c1c
3 changed files with 18 additions and 8 deletions

View file

@ -185,6 +185,8 @@ impl XRMethods for XR {
let mut optional_features = vec![];
let cx = global.get_cx();
// We are supposed to include "viewer" and on immersive devices "local"
// by default here, but this is handled directly in requestReferenceSpace()
if let Some(ref r) = init.requiredFeatures {
for feature in r {
unsafe {