More CanGc fixes (#33888)

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-18 01:06:42 +05:30 committed by GitHub
parent 720d632170
commit 9c893c7f4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 102 additions and 58 deletions

View file

@ -112,24 +112,26 @@ impl XRRayMethods for XRRay {
}
/// <https://immersive-web.github.io/hit-test/#dom-xrray-origin>
fn Origin(&self) -> DomRoot<DOMPointReadOnly> {
fn Origin(&self, can_gc: CanGc) -> DomRoot<DOMPointReadOnly> {
DOMPointReadOnly::new(
&self.global(),
self.ray.origin.x as f64,
self.ray.origin.y as f64,
self.ray.origin.z as f64,
1.,
can_gc,
)
}
/// <https://immersive-web.github.io/hit-test/#dom-xrray-direction>
fn Direction(&self) -> DomRoot<DOMPointReadOnly> {
fn Direction(&self, can_gc: CanGc) -> DomRoot<DOMPointReadOnly> {
DOMPointReadOnly::new(
&self.global(),
self.ray.direction.x as f64,
self.ray.direction.y as f64,
self.ray.direction.z as f64,
0.,
can_gc,
)
}