aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xrwebglbinding.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/xrwebglbinding.rs')
-rw-r--r--components/script/dom/xrwebglbinding.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/script/dom/xrwebglbinding.rs b/components/script/dom/xrwebglbinding.rs
index 64ea31e0bce..fb64c92d7e6 100644
--- a/components/script/dom/xrwebglbinding.rs
+++ b/components/script/dom/xrwebglbinding.rs
@@ -13,7 +13,7 @@ use crate::dom::bindings::codegen::Bindings::XRWebGLBindingBinding::XRWebGLBindi
use crate::dom::bindings::codegen::UnionTypes::WebGLRenderingContextOrWebGL2RenderingContext;
use crate::dom::bindings::error::Error;
use crate::dom::bindings::error::Fallible;
-use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::reflector::reflect_dom_object2;
use crate::dom::bindings::reflector::Reflector;
use crate::dom::bindings::root::Dom;
use crate::dom::bindings::root::DomRoot;
@@ -30,6 +30,7 @@ use crate::dom::xrsession::XRSession;
use crate::dom::xrview::XRView;
use crate::dom::xrwebglsubimage::XRWebGLSubImage;
use dom_struct::dom_struct;
+use js::rust::HandleObject;
#[dom_struct]
pub struct XRWebGLBinding {
@@ -47,20 +48,23 @@ impl XRWebGLBinding {
}
}
- pub fn new(
+ fn new(
global: &Window,
+ proto: Option<HandleObject>,
session: &XRSession,
context: &WebGLRenderingContext,
) -> DomRoot<XRWebGLBinding> {
- reflect_dom_object(
+ reflect_dom_object2(
Box::new(XRWebGLBinding::new_inherited(session, context)),
global,
+ proto,
)
}
#[allow(non_snake_case)]
pub fn Constructor(
global: &Window,
+ proto: Option<HandleObject>,
session: &XRSession,
context: WebGLRenderingContextOrWebGL2RenderingContext,
) -> DomRoot<XRWebGLBinding> {
@@ -70,7 +74,7 @@ impl XRWebGLBinding {
ctx.base_context()
},
};
- XRWebGLBinding::new(global, session, &context)
+ XRWebGLBinding::new(global, proto, session, &context)
}
}