Introduce GlobalScope::networking_task_source

This commit is contained in:
Anthony Ramine 2016-10-04 00:46:27 +02:00
parent a7305b7fc4
commit 1fd470889d
5 changed files with 19 additions and 16 deletions

View file

@ -67,15 +67,6 @@ impl<'a> GlobalRef<'a> {
}
}
/// `ScriptChan` used to send messages to the event loop of this global's
/// thread.
pub fn networking_task_source(&self) -> Box<ScriptChan + Send> {
match *self {
GlobalRef::Window(ref window) => window.networking_task_source(),
GlobalRef::Worker(ref worker) => worker.script_chan(),
}
}
/// `ScriptChan` used to send messages to the event loop of this global's
/// thread.
pub fn file_reading_task_source(&self) -> FileReadingTaskSource {