mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01: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
|
@ -14,8 +14,9 @@ use crate::dom::bindings::str::DOMString;
|
|||
use crate::dom::bindings::trace::RootedTraceableBox;
|
||||
use crate::dom::event::{Event, EventBubbles, EventCancelable};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::JSContext;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSContext};
|
||||
use js::jsapi::Heap;
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::HandleValue;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -135,9 +136,8 @@ impl ErrorEventMethods for ErrorEvent {
|
|||
self.filename.borrow().clone()
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
// https://html.spec.whatwg.org/multipage/#dom-errorevent-error
|
||||
unsafe fn Error(&self, _cx: *mut JSContext) -> JSVal {
|
||||
fn Error(&self, _cx: JSContext) -> JSVal {
|
||||
self.error.get()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue