mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
This commit is contained in:
parent
cd0eb88a3e
commit
35dc5320ab
10 changed files with 55 additions and 37 deletions
|
@ -13,6 +13,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::trace::{JSTraceable, RootedTraceableBox};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
use dom_struct::dom_struct;
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::jsapi::{Heap, JSContext, JSObject};
|
||||
|
@ -62,7 +63,7 @@ impl<T: DomObject + JSTraceable + Iterable> IterableIterator<T> {
|
|||
pub fn new(
|
||||
iterable: &T,
|
||||
type_: IteratorType,
|
||||
wrap: unsafe fn(*mut JSContext, &GlobalScope, Box<IterableIterator<T>>) -> DomRoot<Self>,
|
||||
wrap: unsafe fn(SafeJSContext, &GlobalScope, Box<IterableIterator<T>>) -> DomRoot<Self>,
|
||||
) -> DomRoot<Self> {
|
||||
let iterator = Box::new(IterableIterator {
|
||||
reflector: Reflector::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue