aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-11-14 02:10:04 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-11-14 02:10:04 +0530
commitd5f1bb2df5d8b27893679439b10a320cf378c9d6 (patch)
treecc06fbe26b10d46dccac82e005baa233c08e4a76
parent2ffa845cf463b14b19322d477a77ffd20efa89a9 (diff)
downloadservo-d5f1bb2df5d8b27893679439b10a320cf378c9d6.tar.gz
servo-d5f1bb2df5d8b27893679439b10a320cf378c9d6.zip
Don't overwrite redirected URL in script_task (fixes #3970)
-rw-r--r--components/script/script_task.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 087e3fdf043..fe7f0902dd9 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -751,7 +751,7 @@ impl ScriptTask {
/// The entry point to document loading. Defines bindings, sets up the window and document
/// objects, parses HTML and CSS, and kicks off initial layout.
fn load(&self, pipeline_id: PipelineId, load_data: LoadData) {
- let url = load_data.url.clone();
+ let mut url = load_data.url.clone();
debug!("ScriptTask: loading {} on page {}", url, pipeline_id);
let page = self.page.borrow_mut();
@@ -818,6 +818,7 @@ impl ScriptTask {
}
parse_html(&*page, *document, parser_input, self.resource_task.clone(), Some(load_data));
+ url = page.get_url().clone();
document.set_ready_state(DocumentReadyStateValues::Interactive);