mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -9,8 +9,9 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
|||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::vrfieldofview::VRFieldOfView;
|
||||
use crate::script_runtime::JSContext;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSContext, JSObject};
|
||||
use js::jsapi::{Heap, JSObject};
|
||||
use js::typedarray::{CreateWith, Float32Array};
|
||||
use std::default::Default;
|
||||
use std::ptr;
|
||||
|
@ -67,8 +68,8 @@ impl VREyeParameters {
|
|||
impl VREyeParametersMethods for VREyeParameters {
|
||||
#[allow(unsafe_code)]
|
||||
// https://w3c.github.io/webvr/#dom-vreyeparameters-offset
|
||||
unsafe fn Offset(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
||||
NonNull::new_unchecked(self.offset.get())
|
||||
fn Offset(&self, _cx: JSContext) -> NonNull<JSObject> {
|
||||
unsafe { NonNull::new_unchecked(self.offset.get()) }
|
||||
}
|
||||
|
||||
// https://w3c.github.io/webvr/#dom-vreyeparameters-fieldofview
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue