Use RootedTraceableBox for dictionaries.

This commit is contained in:
Ms2ger 2017-02-14 16:45:36 +01:00
parent f1605ab149
commit f7e2f0e641
11 changed files with 75 additions and 24 deletions

View file

@ -10,6 +10,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::js::{MutHeapJSVal, Root};
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::bindings::trace::RootedTraceableBox;
use dom::event::Event;
use dom::globalscope::GlobalScope;
use js::jsapi::{HandleValue, JSContext};
@ -51,7 +52,7 @@ impl CustomEvent {
#[allow(unsafe_code)]
pub fn Constructor(global: &GlobalScope,
type_: DOMString,
init: &CustomEventBinding::CustomEventInit)
init: RootedTraceableBox<CustomEventBinding::CustomEventInit>)
-> Fallible<Root<CustomEvent>> {
Ok(CustomEvent::new(global,
Atom::from(type_),