Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>

This commit is contained in:
Simon Sapin 2018-01-22 12:42:05 +01:00
parent 897a5b39c5
commit 52eda6082f
22 changed files with 79 additions and 111 deletions

View file

@ -10,7 +10,6 @@ use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContext
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
use dom::bindings::error::Fallible;
use dom::bindings::nonnull::NonNullJSObjectPtr;
use dom::bindings::reflector::{reflect_dom_object, Reflector};
use dom::bindings::root::{Dom, DomRoot, LayoutDom};
use dom::bindings::str::DOMString;
@ -33,6 +32,7 @@ use js::jsapi::{JSContext, JSObject};
use js::jsval::JSVal;
use offscreen_gl_context::GLContextAttributes;
use script_layout_interface::HTMLCanvasDataSource;
use std::ptr::NonNull;
#[dom_struct]
pub struct WebGL2RenderingContext {
@ -132,7 +132,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
#[allow(unsafe_code)]
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14
unsafe fn GetExtension(&self, cx: *mut JSContext, name: DOMString) -> Option<NonNullJSObjectPtr> {
unsafe fn GetExtension(&self, cx: *mut JSContext, name: DOMString) -> Option<NonNull<JSObject>> {
self.base.GetExtension(cx, name)
}