Support the updated spidermonkey bindings

This commit is contained in:
Michael Wu 2015-09-23 16:53:03 -04:00
parent 32daa17d5c
commit e733a7c46a
20 changed files with 234 additions and 223 deletions

View file

@ -232,6 +232,7 @@ impl TimerManager {
}
}
#[allow(unsafe_code)]
pub fn fire_timer<T: Reflectable>(&self, timer_id: TimerId, this: &T) {
let (is_interval, callback, args): (IsInterval, TimerCallback, Vec<JSVal>) =
@ -245,7 +246,9 @@ impl TimerManager {
match callback {
TimerCallback::FunctionTimerCallback(function) => {
let arg_handles = args.iter().by_ref().map(|arg| HandleValue { ptr: arg }).collect();
let arg_handles = args.iter().by_ref().map(|arg| unsafe {
HandleValue::from_marked_location(arg)
}).collect();
let _ = function.Call_(this, arg_handles, Report);
}
TimerCallback::StringTimerCallback(code_str) => {