diff options
Diffstat (limited to 'components/script/dom/vrframedata.rs')
-rw-r--r-- | components/script/dom/vrframedata.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/vrframedata.rs b/components/script/dom/vrframedata.rs index 530a3727020..621f70a55c9 100644 --- a/components/script/dom/vrframedata.rs +++ b/components/script/dom/vrframedata.rs @@ -5,7 +5,6 @@ use dom::bindings::codegen::Bindings::VRFrameDataBinding; use dom::bindings::codegen::Bindings::VRFrameDataBinding::VRFrameDataMethods; use dom::bindings::error::Fallible; -use dom::bindings::nonnull::NonNullJSObjectPtr; use dom::bindings::num::Finite; use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot}; @@ -17,6 +16,7 @@ use js::jsapi::{Heap, JSContext, JSObject}; use js::typedarray::{Float32Array, CreateWith}; use std::cell::Cell; use std::ptr; +use std::ptr::NonNull; use webvr_traits::WebVRFrameData; #[dom_struct] @@ -118,26 +118,26 @@ impl VRFrameDataMethods for VRFrameData { #[allow(unsafe_code)] // https://w3c.github.io/webvr/#dom-vrframedata-leftprojectionmatrix - unsafe fn LeftProjectionMatrix(&self, _cx: *mut JSContext) -> NonNullJSObjectPtr { - NonNullJSObjectPtr::new_unchecked(self.left_proj.get()) + unsafe fn LeftProjectionMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> { + NonNull::new_unchecked(self.left_proj.get()) } #[allow(unsafe_code)] // https://w3c.github.io/webvr/#dom-vrframedata-leftviewmatrix - unsafe fn LeftViewMatrix(&self, _cx: *mut JSContext) -> NonNullJSObjectPtr { - NonNullJSObjectPtr::new_unchecked(self.left_view.get()) + unsafe fn LeftViewMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> { + NonNull::new_unchecked(self.left_view.get()) } #[allow(unsafe_code)] // https://w3c.github.io/webvr/#dom-vrframedata-rightprojectionmatrix - unsafe fn RightProjectionMatrix(&self, _cx: *mut JSContext) -> NonNullJSObjectPtr { - NonNullJSObjectPtr::new_unchecked(self.right_proj.get()) + unsafe fn RightProjectionMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> { + NonNull::new_unchecked(self.right_proj.get()) } #[allow(unsafe_code)] // https://w3c.github.io/webvr/#dom-vrframedata-rightviewmatrix - unsafe fn RightViewMatrix(&self, _cx: *mut JSContext) -> NonNullJSObjectPtr { - NonNullJSObjectPtr::new_unchecked(self.right_view.get()) + unsafe fn RightViewMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> { + NonNull::new_unchecked(self.right_view.get()) } // https://w3c.github.io/webvr/#dom-vrframedata-pose |