aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/timers.rs
diff options
context:
space:
mode:
authorMichael Wu <mwu@mozilla.com>2015-09-23 16:53:03 -0400
committerMichael Wu <mwu@mozilla.com>2015-10-14 15:30:52 -0400
commite733a7c46a5d14a1be219e76136cdcb2d678d33a (patch)
tree7a50317a6cfa109eb3a7049add9ad87597dac55e /components/script/timers.rs
parent32daa17d5cbcad02db0713e21e52410cdc60480e (diff)
downloadservo-e733a7c46a5d14a1be219e76136cdcb2d678d33a.tar.gz
servo-e733a7c46a5d14a1be219e76136cdcb2d678d33a.zip
Support the updated spidermonkey bindings
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r--components/script/timers.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs
index 97aa20a3fa7..1704ba3cbbf 100644
--- a/components/script/timers.rs
+++ b/components/script/timers.rs
@@ -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) => {