aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmlhttprequest.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-01 17:24:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 20:59:13 +0200
commit27f100b1d47058b92d0e23d8c1b2e472fb0eafca (patch)
tree2f12c1364fe0b5abb9b7f1405be81e04023193dd /components/script/dom/xmlhttprequest.rs
parentc6ff767625fff00e7c8f41d254c074e8e1e277be (diff)
downloadservo-27f100b1d47058b92d0e23d8c1b2e472fb0eafca.tar.gz
servo-27f100b1d47058b92d0e23d8c1b2e472fb0eafca.zip
Introduce GlobalScope::pipeline_id
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r--components/script/dom/xmlhttprequest.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 4c9397db566..0cf5381767d 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -284,7 +284,7 @@ impl LoadOrigin for XMLHttpRequest {
fn pipeline_id(&self) -> Option<PipelineId> {
let global = self.global();
- Some(global.r().pipeline_id())
+ Some(global.r().as_global_scope().pipeline_id())
}
}
@@ -1208,7 +1208,10 @@ impl XMLHttpRequest {
let decoded = charset.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap();
let document = self.new_doc(IsHTMLDocument::HTMLDocument);
// TODO: Disable scripting while parsing
- parse_html(document.r(), DOMString::from(decoded), wr.get_url(), ParseContext::Owner(Some(wr.pipeline_id())));
+ parse_html(document.r(),
+ DOMString::from(decoded),
+ wr.get_url(),
+ ParseContext::Owner(Some(wr.as_global_scope().pipeline_id())));
document
}
@@ -1222,7 +1225,7 @@ impl XMLHttpRequest {
parse_xml(document.r(),
DOMString::from(decoded),
wr.get_url(),
- xml::ParseContext::Owner(Some(wr.pipeline_id())));
+ xml::ParseContext::Owner(Some(wr.as_global_scope().pipeline_id())));
document
}