Compile WebIDL return type "object" to NonZero<*mut JSObject>

This commit is contained in:
Anthony Ramine 2016-08-29 00:35:17 +02:00
parent 3e32948a39
commit 6e1523f4ae
11 changed files with 74 additions and 48 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::{CanvasCommonMsg, CanvasMsg, byte_swap};
use core::nonzero::NonZero;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
@ -631,8 +632,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14
fn GetExtension(&self, _cx: *mut JSContext, _name: DOMString) -> *mut JSObject {
0 as *mut JSObject
fn GetExtension(&self, _cx: *mut JSContext, _name: DOMString)
-> Option<NonZero<*mut JSObject>> {
None
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3