aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workerglobalscope.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-10-27 19:52:19 -0700
committerJosh Matthews <josh@joshmatthews.net>2015-11-12 14:30:25 -0500
commit1dc0d61c3cfbfbb856c970e9bb4e72f45837a457 (patch)
treeb17e1447f358096168067901340d9958835f543b /components/script/dom/workerglobalscope.rs
parent4848e37e2e0da2f83b1d7f0d231d59047012ff95 (diff)
downloadservo-1dc0d61c3cfbfbb856c970e9bb4e72f45837a457.tar.gz
servo-1dc0d61c3cfbfbb856c970e9bb4e72f45837a457.zip
script: Make timer events e10s-safe.
Closes #8235.
Diffstat (limited to 'components/script/dom/workerglobalscope.rs')
-rw-r--r--components/script/dom/workerglobalscope.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 019d526b48f..28854fd84ac 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -24,11 +24,11 @@ use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
use net_traits::{ResourceTask, load_whole_resource};
use profile_traits::mem;
use script_task::{CommonScriptMsg, ScriptChan, ScriptPort};
-use script_traits::{MsDuration, TimerEventChan, TimerEventId, TimerEventRequest, TimerSource};
+use script_traits::{MsDuration, TimerEvent, TimerEventId, TimerEventRequest, TimerSource};
use std::cell::Cell;
use std::default::Default;
use std::rc::Rc;
-use std::sync::mpsc::{Receiver, Sender};
+use std::sync::mpsc::Receiver;
use timers::{ActiveTimers, IsInterval, ScheduledCallback, TimerCallback, TimerHandle};
use url::{Url, UrlParser};
use util::str::DOMString;
@@ -44,7 +44,7 @@ pub struct WorkerGlobalScopeInit {
pub to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
pub from_devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
pub constellation_chan: ConstellationChan,
- pub scheduler_chan: Sender<TimerEventRequest>,
+ pub scheduler_chan: IpcSender<TimerEventRequest>,
pub worker_id: WorkerId,
}
@@ -87,7 +87,7 @@ pub struct WorkerGlobalScope {
constellation_chan: ConstellationChan,
#[ignore_heap_size_of = "Defined in std"]
- scheduler_chan: Sender<TimerEventRequest>,
+ scheduler_chan: IpcSender<TimerEventRequest>,
}
impl WorkerGlobalScope {
@@ -95,7 +95,7 @@ impl WorkerGlobalScope {
worker_url: Url,
runtime: Rc<Runtime>,
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
- timer_event_chan: Box<TimerEventChan + Send>)
+ timer_event_chan: IpcSender<TimerEvent>)
-> WorkerGlobalScope {
WorkerGlobalScope {
eventtarget: EventTarget::new_inherited(),
@@ -139,7 +139,7 @@ impl WorkerGlobalScope {
self.constellation_chan.clone()
}
- pub fn scheduler_chan(&self) -> Sender<TimerEventRequest> {
+ pub fn scheduler_chan(&self) -> IpcSender<TimerEventRequest> {
self.scheduler_chan.clone()
}