Ensure that Reflectors are the first field

This commit is contained in:
Manish Goregaokar 2014-12-10 11:56:20 +05:30
parent d761877ef6
commit 21a888341d
14 changed files with 146 additions and 21 deletions

View file

@ -72,16 +72,16 @@ pub struct EventListenerEntry {
#[dom_struct]
pub struct EventTarget {
type_id: EventTargetTypeId,
reflector_: Reflector,
type_id: EventTargetTypeId,
handlers: DOMRefCell<HashMap<DOMString, Vec<EventListenerEntry>, FnvHasher>>,
}
impl EventTarget {
pub fn new_inherited(type_id: EventTargetTypeId) -> EventTarget {
EventTarget {
type_id: type_id,
reflector_: Reflector::new(),
type_id: type_id,
handlers: DOMRefCell::new(HashMap::with_hasher(FnvHasher)),
}
}