Auto merge of #8903 - KiChjang:layout-reporter-redirect, r=nox

fix for Layout memory reporter uses pre-redirect url

Rebase of #7612.

Fixes #6872.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8903)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-16 23:18:30 +05:30
commit bc7158310c
3 changed files with 27 additions and 12 deletions

View file

@ -1558,6 +1558,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