Bug 1731252 [wpt PR 30705] - Validate XRRigidTransform Constructor Arguments, a=testonly
commit669472dd4a57d0fd36bebb0bd87d659a2ef45b31
authorAlexander Cooper <alcooper@chromium.org>
Sun, 3 Oct 2021 10:12:43 +0000 (3 10:12 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 4 Oct 2021 00:19:00 +0000 (4 00:19 +0000)
tree48feda47a406eeec886a385b07d3b9ff6afbc3ab
parent886fa45030ee9ca3aa9a273535e6ac18db573ec7
Bug 1731252 [wpt PR 30705] - Validate XRRigidTransform Constructor Arguments, a=testonly

Automatic update from web-platform-tests
Validate XRRigidTransform Constructor Arguments

Per the spec, XRRigidTransform's created with DOMPoint's which contain
non-finite (e.g. NaN/Infinity) should throw a type error and fail to
be created. While not doing so seems to work fine on production builds
(seeming to default to using identity for the component which had the
invalid portion), on DCHECK builds, these poorly constructed objects
start to hit DCHECKs when methods on the object are attempted to be
used.

This fixes the XRRigidTransform::Create method to appropriately throw
per the spec and thus should avoid the later DCHECKs. This change also
adds a WPT to validate this specced behavior.

Fixed: 1246156
Change-Id: I5d13784868056896f15b8c803ce4b6abb69f03fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3159085
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Piotr Bialecki <bialpio@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#921244}

--

wpt-commits: a02b7e83bf4033d2130f84519557d5ede62eae2e
wpt-pr: 30705
testing/web-platform/tests/webxr/xrRigidTransform_constructor.https.html