diff options
author | ddh <dianehosfelt@gmail.com> | 2017-10-24 02:45:55 +0100 |
---|---|---|
committer | ddh <dianehosfelt@gmail.com> | 2017-10-25 14:25:58 +0100 |
commit | 52b63def44b4819184d2badcc4d123b770a7878a (patch) | |
tree | e027a7ad1ab55ab27b71005f0472a38469998267 /components/script/task_source/networking.rs | |
parent | 2ffbe5398970e54ad55d3e53b495ee6651b64f4c (diff) | |
download | servo-52b63def44b4819184d2badcc4d123b770a7878a.tar.gz servo-52b63def44b4819184d2badcc4d123b770a7878a.zip |
added pipelines to all task sources
changed task sources to accept pipeline ids
Diffstat (limited to 'components/script/task_source/networking.rs')
-rw-r--r-- | components/script/task_source/networking.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs index 0c2fd8f6162..ed192d08003 100644 --- a/components/script/task_source/networking.rs +++ b/components/script/task_source/networking.rs @@ -2,16 +2,17 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use msg::constellation_msg::PipelineId; use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory}; use task::{TaskCanceller, TaskOnce}; use task_source::TaskSource; #[derive(JSTraceable)] -pub struct NetworkingTaskSource(pub Box<ScriptChan + Send + 'static>); +pub struct NetworkingTaskSource(pub Box<ScriptChan + Send + 'static>, pub PipelineId); impl Clone for NetworkingTaskSource { fn clone(&self) -> NetworkingTaskSource { - NetworkingTaskSource(self.0.clone()) + NetworkingTaskSource(self.0.clone(), self.1.clone()) } } @@ -27,7 +28,7 @@ impl TaskSource for NetworkingTaskSource { self.0.send(CommonScriptMsg::Task( ScriptThreadEventCategory::NetworkEvent, Box::new(canceller.wrap_task(task)), - None + Some(self.1), )) } } @@ -42,7 +43,7 @@ impl NetworkingTaskSource { self.0.send(CommonScriptMsg::Task( ScriptThreadEventCategory::NetworkEvent, Box::new(task), - None //TODO + Some(self.1), )) } } |