From 52fbaf7e17bf19d52675cdf044fd2db60080fbb4 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 14 May 2014 12:37:35 +0200 Subject: [PATCH] Pass a non-Option SubpageId to Pipeline::with_script. The ScriptTask is only reused for subpages, so there's no reason to pass an Option. --- src/components/main/constellation.rs | 2 +- src/components/main/pipeline.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs index fcd93ee238c..e2c63f16630 100644 --- a/src/components/main/constellation.rs +++ b/src/components/main/constellation.rs @@ -573,7 +573,7 @@ impl Constellation { debug!("Constellation: loading same-origin iframe at {:?}", url); // Reuse the script task if same-origin url's Pipeline::with_script(next_pipeline_id, - Some(subpage_id), + subpage_id, self.chan.clone(), self.compositor_chan.clone(), self.image_cache_task.clone(), diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index 2b17085e6a2..d4a117fe08b 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -45,7 +45,7 @@ impl Pipeline { /// Starts a render task, layout task, and script task. Returns the channels wrapped in a /// struct. pub fn with_script(id: PipelineId, - subpage_id: Option, + subpage_id: SubpageId, constellation_chan: ConstellationChan, compositor_chan: CompositorChan, image_cache_task: ImageCacheTask, @@ -61,7 +61,7 @@ impl Pipeline { let failure = Failure { pipeline_id: id, - subpage_id: subpage_id, + subpage_id: Some(subpage_id), }; RenderTask::create(id, @@ -95,7 +95,7 @@ impl Pipeline { chan.send(AttachLayoutMsg(new_layout_info)); Pipeline::new(id, - subpage_id, + Some(subpage_id), script_pipeline.script_chan.clone(), layout_chan, render_chan,