diff options
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r-- | components/script/timers.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs index 082ea626790..0502bdfcd38 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -100,7 +100,7 @@ impl TimerManager { timeout: i32, is_interval: IsInterval, source: TimerSource, - script_chan: ScriptChan) + script_chan: Box<ScriptChan+Send>) -> i32 { let timeout = cmp::max(0, timeout) as u64; let handle = self.next_timer_handle.get(); @@ -136,8 +136,7 @@ impl TimerManager { let id = select.wait(); if id == timeout_handle.id() { timeout_port.recv(); - let ScriptChan(ref chan) = script_chan; - chan.send(ScriptMsg::FireTimer(source, TimerId(handle))); + script_chan.send(ScriptMsg::FireTimer(source, TimerId(handle))); if is_interval == IsInterval::NonInterval { break; } |