mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>
This commit is contained in:
parent
897a5b39c5
commit
52eda6082f
22 changed files with 79 additions and 111 deletions
|
@ -5,7 +5,6 @@
|
|||
use dom::bindings::cell::DomRefCell;
|
||||
use dom::bindings::codegen::Bindings::VREyeParametersBinding;
|
||||
use dom::bindings::codegen::Bindings::VREyeParametersBinding::VREyeParametersMethods;
|
||||
use dom::bindings::nonnull::NonNullJSObjectPtr;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::root::{Dom, DomRoot};
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
@ -15,6 +14,7 @@ use js::jsapi::{Heap, JSContext, JSObject};
|
|||
use js::typedarray::{Float32Array, CreateWith};
|
||||
use std::default::Default;
|
||||
use std::ptr;
|
||||
use std::ptr::NonNull;
|
||||
use webvr_traits::WebVREyeParameters;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -60,8 +60,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) -> NonNullJSObjectPtr {
|
||||
NonNullJSObjectPtr::new_unchecked(self.offset.get())
|
||||
unsafe fn Offset(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
||||
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