Introduce GlobalScope::time_profiler_chan

This commit is contained in:
Anthony Ramine 2016-10-01 04:00:23 +02:00
parent bfa7d045d0
commit ae3763e7b3
5 changed files with 23 additions and 33 deletions

View file

@ -174,10 +174,6 @@ pub struct Window {
scheduler_chan: IpcSender<TimerEventRequest>,
timers: OneshotTimers,
/// For sending messages to the memory profiler.
#[ignore_heap_size_of = "channels are hard"]
time_profiler_chan: ProfilerChan,
/// For sending timeline markers. Will be ignored if
/// no devtools server
devtools_markers: DOMRefCell<HashSet<TimelineMarkerType>>,
@ -1376,10 +1372,6 @@ impl Window {
&self.resource_threads
}
pub fn time_profiler_chan(&self) -> &ProfilerChan {
&self.time_profiler_chan
}
pub fn layout_chan(&self) -> &Sender<Msg> {
&self.layout_chan
}
@ -1593,7 +1585,8 @@ impl Window {
};
let current_time = time::get_time();
let win = box Window {
globalscope: GlobalScope::new_inherited(devtools_chan, mem_profiler_chan),
globalscope:
GlobalScope::new_inherited(devtools_chan, mem_profiler_chan, time_profiler_chan),
script_chan: script_chan,
dom_manipulation_task_source: dom_task_source,
user_interaction_task_source: user_task_source,
@ -1603,7 +1596,6 @@ impl Window {
image_cache_chan: image_cache_chan,
navigator: Default::default(),
image_cache_thread: image_cache_thread,
time_profiler_chan: time_profiler_chan,
history: Default::default(),
browsing_context: Default::default(),
performance: Default::default(),