mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
More files with CanGc fixes (#33892)
* More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
fde8d72aca
commit
af6154cf63
31 changed files with 226 additions and 100 deletions
|
@ -44,8 +44,12 @@ impl XRRigidTransform {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, transform: ApiRigidTransform) -> DomRoot<XRRigidTransform> {
|
||||
Self::new_with_proto(global, None, transform, CanGc::note())
|
||||
pub fn new(
|
||||
global: &GlobalScope,
|
||||
transform: ApiRigidTransform,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<XRRigidTransform> {
|
||||
Self::new_with_proto(global, None, transform, can_gc)
|
||||
}
|
||||
|
||||
fn new_with_proto(
|
||||
|
@ -62,9 +66,9 @@ impl XRRigidTransform {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn identity(window: &GlobalScope) -> DomRoot<XRRigidTransform> {
|
||||
pub fn identity(window: &GlobalScope, can_gc: CanGc) -> DomRoot<XRRigidTransform> {
|
||||
let transform = RigidTransform3D::identity();
|
||||
XRRigidTransform::new(window, transform)
|
||||
XRRigidTransform::new(window, transform, can_gc)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,9 +159,9 @@ impl XRRigidTransformMethods for XRRigidTransform {
|
|||
})
|
||||
}
|
||||
// https://immersive-web.github.io/webxr/#dom-xrrigidtransform-inverse
|
||||
fn Inverse(&self) -> DomRoot<XRRigidTransform> {
|
||||
fn Inverse(&self, can_gc: CanGc) -> DomRoot<XRRigidTransform> {
|
||||
self.inverse.or_init(|| {
|
||||
let transform = XRRigidTransform::new(&self.global(), self.transform.inverse());
|
||||
let transform = XRRigidTransform::new(&self.global(), self.transform.inverse(), can_gc);
|
||||
transform.inverse.set(Some(self));
|
||||
transform
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue