Use hosts-replaced URL only when loading resources

This commit is contained in:
James Graham 2015-06-18 13:51:59 +01:00
parent 56a9eab2a0
commit f52276d2cc
15 changed files with 162 additions and 132 deletions

View file

@ -642,10 +642,12 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
// FIXME(tkuehn): Need to follow the standardized spec for checking same-origin
// Reuse the script task if the URL is same-origin
if same_script {
debug!("Constellation: loading same-origin iframe at {:?}", url);
debug!("Constellation: loading same-origin iframe, \
parent url {:?}, iframe url {:?}", source_url, url);
Some(source_pipeline.script_chan.clone())
} else {
debug!("Constellation: loading cross-origin iframe at {:?}", url);
debug!("Constellation: loading cross-origin iframe, \
parent url {:?}, iframe url {:?}", source_url, url);
None
}
};