Convert CGTraitInterface to use safe JSContext instead of raw JSContext

This commit is contained in:
marmeladema 2019-07-22 01:09:24 +01:00
parent 808fa65aef
commit 2c5d0a6ebc
43 changed files with 443 additions and 528 deletions

View file

@ -15,9 +15,9 @@ use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
use crate::dom::offscreencanvasrenderingcontext2d::OffscreenCanvasRenderingContext2D;
use crate::script_runtime::JSContext;
use dom_struct::dom_struct;
use euclid::default::Size2D;
use js::jsapi::JSContext;
use js::rust::HandleValue;
use ref_filter_map;
use std::cell::Cell;
@ -108,10 +108,9 @@ impl OffscreenCanvas {
impl OffscreenCanvasMethods for OffscreenCanvas {
// https://html.spec.whatwg.org/multipage/#dom-offscreencanvas-getcontext
#[allow(unsafe_code)]
unsafe fn GetContext(
fn GetContext(
&self,
_cx: *mut JSContext,
_cx: JSContext,
id: DOMString,
_options: HandleValue,
) -> Option<OffscreenRenderingContext> {