diff options
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r-- | components/script/timers.rs | 5 |
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) => { |