mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Convert CGTraitInterface to use safe JSContext instead of raw JSContext
This commit is contained in:
parent
808fa65aef
commit
2c5d0a6ebc
43 changed files with 443 additions and 528 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue