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.
This commit is contained in:
Ms2ger 2014-05-14 12:37:35 +02:00
parent 288550a2bf
commit 52fbaf7e17
2 changed files with 4 additions and 4 deletions

View file

@ -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(),

View file

@ -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<SubpageId>,
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,