From e733a7c46a5d14a1be219e76136cdcb2d678d33a Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 23 Sep 2015 16:53:03 -0400 Subject: Support the updated spidermonkey bindings --- components/script/timers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'components/script/timers.rs') 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(&self, timer_id: TimerId, this: &T) { let (is_interval, callback, args): (IsInterval, TimerCallback, Vec) = @@ -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) => { -- cgit v1.2.3