KEMBAR78
Only allow sessions to use features they explicity request or are implicitly granted based on mode by Manishearth · Pull Request #1189 · immersive-web/webxr · GitHub
Skip to content

Conversation

Manishearth
Copy link
Contributor

@Manishearth Manishearth commented Mar 30, 2021

Previously, features would "carry over" between XR sessions for the same web page, which can lead to sessions unpredictably being granted features they did not ask for.

With this change, sessions may only use features they have explicitly requested. Previously granted features are still used to skip consent prompts, but must be explicitly requested on session creation.

Note: prior to this PR, the experimental not-yet-implemented Permissions Request API could have been used for mid session feature requests. That is no longer the case and we need to add an API to reenable this if we wish (#1190).

Fixes #1178


Preview | Diff

@cabanier
Copy link
Member

This looks like a good change. Do we know if this is compatible with current implementations?

Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@cabanier: It's compatible with Chromium's implementation, AFAIK.

@toji toji merged commit b6ab53f into main Apr 2, 2021
@toji toji deleted the permissions-session branch April 2, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use session's requested features instead of session device's enabled features to check if a reference space is supported

3 participants