aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workerglobalscope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/workerglobalscope.rs')
-rw-r--r--components/script/dom/workerglobalscope.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 260476859e9..8d473f6f081 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -22,7 +22,7 @@ use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
use devtools_traits::DevtoolsControlChan;
-use msg::constellation_msg::{PipelineId, WorkerId};
+use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
use profile_traits::mem;
use net_traits::{load_whole_resource, ResourceTask};
use util::str::DOMString;
@@ -55,6 +55,7 @@ pub struct WorkerGlobalScope {
timers: TimerManager,
mem_profiler_chan: mem::ProfilerChan,
devtools_chan: Option<DevtoolsControlChan>,
+ constellation_chan: ConstellationChan,
}
impl WorkerGlobalScope {
@@ -63,7 +64,8 @@ impl WorkerGlobalScope {
runtime: Rc<Runtime>,
resource_task: ResourceTask,
mem_profiler_chan: mem::ProfilerChan,
- devtools_chan: Option<DevtoolsControlChan>) -> WorkerGlobalScope {
+ devtools_chan: Option<DevtoolsControlChan>,
+ constellation_chan: ConstellationChan) -> WorkerGlobalScope {
WorkerGlobalScope {
eventtarget: EventTarget::new_inherited(EventTargetTypeId::WorkerGlobalScope(type_id)),
next_worker_id: Cell::new(WorkerId(0)),
@@ -77,6 +79,7 @@ impl WorkerGlobalScope {
timers: TimerManager::new(),
mem_profiler_chan: mem_profiler_chan,
devtools_chan: devtools_chan,
+ constellation_chan: constellation_chan,
}
}
@@ -88,6 +91,10 @@ impl WorkerGlobalScope {
self.devtools_chan.clone()
}
+ pub fn constellation_chan(&self) -> ConstellationChan {
+ self.constellation_chan.clone()
+ }
+
#[inline]
pub fn eventtarget<'a>(&'a self) -> &'a EventTarget {
&self.eventtarget