Skip to content

Only allow sessions to use features they explicity request or are implicitly granted based on mode #1189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 2, 2021

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