mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
More CanGc fixes (#33888)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
720d632170
commit
9c893c7f4d
25 changed files with 102 additions and 58 deletions
|
@ -15,7 +15,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::xrreferencespace::XRReferenceSpace;
|
||||
use crate::dom::xrrigidtransform::XRRigidTransform;
|
||||
use crate::dom::xrsession::XRSession;
|
||||
use crate::script_runtime::JSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRBoundedReferenceSpace {
|
||||
|
@ -63,12 +63,19 @@ impl XRBoundedReferenceSpace {
|
|||
|
||||
impl XRBoundedReferenceSpaceMethods for XRBoundedReferenceSpace {
|
||||
/// <https://www.w3.org/TR/webxr/#dom-xrboundedreferencespace-boundsgeometry>
|
||||
fn BoundsGeometry(&self, cx: JSContext) -> JSVal {
|
||||
fn BoundsGeometry(&self, cx: JSContext, can_gc: CanGc) -> JSVal {
|
||||
if let Some(bounds) = self.reference_space.get_bounds() {
|
||||
let points: Vec<DomRoot<DOMPointReadOnly>> = bounds
|
||||
.into_iter()
|
||||
.map(|point| {
|
||||
DOMPointReadOnly::new(&self.global(), point.x.into(), 0.0, point.y.into(), 1.0)
|
||||
DOMPointReadOnly::new(
|
||||
&self.global(),
|
||||
point.x.into(),
|
||||
0.0,
|
||||
point.y.into(),
|
||||
1.0,
|
||||
can_gc,
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue