fix for Layout memory reporter uses pre-redirect url #6872

This commit is contained in:
Arnaud Marant 2015-09-12 13:09:41 +02:00 committed by Keith Yeung
parent 8ba470d79f
commit 239f1ae1a7
3 changed files with 28 additions and 8 deletions

View file

@ -1549,6 +1549,11 @@ impl ScriptTask {
/// objects, parses HTML and CSS, and kicks off initial layout.
fn load(&self, metadata: Metadata, incomplete: InProgressLoad) -> ParserRoot {
let final_url = metadata.final_url.clone();
{
// send the final url to the layout task.
let LayoutChan(ref chan) = incomplete.layout_chan;
chan.send(layout_interface::Msg::SetFinalUrl(final_url.clone())).unwrap();
}
debug!("ScriptTask: loading {} on page {:?}", incomplete.url.serialize(), incomplete.pipeline_id);
// We should either be initializing a root page or loading a child page of an