Enforce pose protection in XRFrame methods
Currently there are two ways to get XRFrame's via the spec. The first is in a rAF callback, and the second is as a result of an XRInputSource event. Currently, if poses are not to be handed out, neither of these methods should fire. However, to be fully spec compliant in the event of future changes (especially from AR) allowing frames to be handed out in other circumstances, the getPose and getViewerPose methods need to throw SecurityError if they should not hand out poses. This adds the second layer of pose protection in that XRFrame's methods will throw if poses cannot or should not be handed out. Due to the fact that frames can only be achieved in the two ways mentioned above, both of which should be blocked when these methods would throw, no test is added for this behavior. Bug: 1008573 Change-Id: If9940b290ad1c352c24d0660100ccbade3f1af59 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832486 Commit-Queue: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Jacob DeWitt <jacde@chromium.org> Auto-Submit: Alexander Cooper <alcooper@chromium.org> Reviewed-by:Jacob DeWitt <jacde@chromium.org> Cr-Commit-Position: refs/heads/master@{#701395}
Showing
Please register or sign in to comment