mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Convert CGTraitInterface to use safe JSContext instead of raw JSContext
This commit is contained in:
parent
808fa65aef
commit
2c5d0a6ebc
43 changed files with 443 additions and 528 deletions
|
@ -12,9 +12,10 @@ use crate::dom::xrpose::XRPose;
|
|||
use crate::dom::xrrigidtransform::XRRigidTransform;
|
||||
use crate::dom::xrsession::{cast_transform, ApiViewerPose, XRSession};
|
||||
use crate::dom::xrview::XRView;
|
||||
use crate::script_runtime::JSContext;
|
||||
use dom_struct::dom_struct;
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::jsapi::{Heap, JSContext};
|
||||
use js::jsapi::Heap;
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
use webxr_api::Views;
|
||||
|
||||
|
@ -69,8 +70,7 @@ impl XRViewerPose {
|
|||
|
||||
impl XRViewerPoseMethods for XRViewerPose {
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrviewerpose-views
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn Views(&self, _cx: *mut JSContext) -> JSVal {
|
||||
fn Views(&self, _cx: JSContext) -> JSVal {
|
||||
self.views.get()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue