Skip to content

getViewport with an invalid view throws an error #771

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 1 commit into from
Jul 19, 2019
Merged

Conversation

toji
Copy link
Member

@toji toji commented Jul 19, 2019

/fixes #769 (sort of).

The previous logic to return null in situations where the passed view
was from a different session was not consistent with the error behavior
elsewhere. As a specific example, passing spaces from one session to an
XRFrame from a different session throws an InvalidStateError. As such,
throwing the same error here for the same type of validation makes the
spec more internally consistent.

/fixes #769 (sort of).

The previous logic to return `null` in situations where the passed view
was from a different session was not consistent with the error behavior
elsewhere. As a specific example, passing spaces from one session to an
XRFrame from a different session throws an `InvalidStateError`. As such,
throwing the same error here for the same type of validation makes the
spec more internally consistent.
@toji toji merged commit 6be299a into master Jul 19, 2019
@toji toji deleted the viewport-error branch July 19, 2019 21:27
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.

Should getViewport return null if there is no matching viewport?
2 participants