Skip to content

Commit

Permalink
Use DOMRefCell for EventTarget.
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuharuohzeki committed Oct 22, 2014
1 parent 1aefa54 commit 752c821
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/eventtarget.rs
Expand Up @@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use dom::bindings::callback::CallbackContainer;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
use dom::bindings::codegen::Bindings::EventTargetBinding::EventTargetMethods;
Expand All @@ -19,7 +20,6 @@ use js::jsapi::{JS_CompileUCFunction, JS_GetFunctionObject, JS_CloneFunctionObje
use js::jsapi::{JSContext, JSObject};
use servo_util::str::DOMString;
use libc::{c_char, size_t};
use std::cell::RefCell;
use std::ptr;
use url::Url;

Expand Down Expand Up @@ -69,15 +69,15 @@ pub struct EventListenerEntry {
pub struct EventTarget {
type_id: EventTargetTypeId,
reflector_: Reflector,
handlers: RefCell<HashMap<DOMString, Vec<EventListenerEntry>>>,
handlers: DOMRefCell<HashMap<DOMString, Vec<EventListenerEntry>>>,
}

impl EventTarget {
pub fn new_inherited(type_id: EventTargetTypeId) -> EventTarget {
EventTarget {
type_id: type_id,
reflector_: Reflector::new(),
handlers: RefCell::new(HashMap::new()),
handlers: DOMRefCell::new(HashMap::new()),
}
}

Expand Down

0 comments on commit 752c821

Please sign in to comment.