Excise SubpageId and use only PipelineIds

SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.
This commit is contained in:
Aneesh Agrawal 2016-06-09 08:17:30 -04:00
parent b9b25b6f82
commit 56fbfd46a4
12 changed files with 145 additions and 217 deletions

View file

@ -30,7 +30,7 @@ use hyper::header::ContentType;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use js::jsapi::JSTracer;
use msg::constellation_msg::{PipelineId, SubpageId};
use msg::constellation_msg::PipelineId;
use net_traits::{AsyncResponseListener, Metadata, NetworkError};
use network_listener::PreInvoke;
use parse::{Parser, ParserRef, TrustedParser};
@ -67,19 +67,16 @@ pub struct ParserContext {
is_synthesized_document: bool,
/// The pipeline associated with this document.
id: PipelineId,
/// The subpage associated with this document.
subpage: Option<SubpageId>,
/// The URL for this document.
url: Url,
}
impl ParserContext {
pub fn new(id: PipelineId, subpage: Option<SubpageId>, url: Url) -> ParserContext {
pub fn new(id: PipelineId, url: Url) -> ParserContext {
ParserContext {
parser: None,
is_synthesized_document: false,
id: id,
subpage: subpage,
url: url,
}
}
@ -102,7 +99,6 @@ impl AsyncResponseListener for ParserContext {
let content_type =
metadata.clone().and_then(|meta| meta.content_type).map(Serde::into_inner);
let parser = match ScriptThread::page_headers_available(&self.id,
self.subpage.as_ref(),
metadata) {
Some(parser) => parser,
None => return,