Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing.

This commit is contained in:
Josh Matthews 2014-03-28 10:17:56 -04:00
parent 4051a8096d
commit ffdc3f5b32
109 changed files with 1567 additions and 996 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::js::JS;
use dom::bindings::js::{JS, JSRef};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::bindings::error::{Fallible, InvalidState};
use dom::bindings::codegen::BindingDeclarations::EventListenerBinding;
@ -102,15 +102,15 @@ impl EventTarget {
}
}
pub fn DispatchEvent(&self, abstract_self: &JS<EventTarget>,
event: &mut JS<Event>) -> Fallible<bool> {
pub fn DispatchEvent(&self, abstract_self: &JSRef<EventTarget>,
event: &mut JSRef<Event>) -> Fallible<bool> {
self.dispatch_event_with_target(abstract_self, None, event)
}
pub fn dispatch_event_with_target(&self,
abstract_self: &JS<EventTarget>,
abstract_target: Option<JS<EventTarget>>,
event: &mut JS<Event>) -> Fallible<bool> {
abstract_self: &JSRef<EventTarget>,
abstract_target: Option<JSRef<EventTarget>>,
event: &mut JSRef<Event>) -> Fallible<bool> {
if event.get().dispatching || !event.get().initialized {
return Err(InvalidState);
}