diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-01 17:24:54 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 20:59:13 +0200 |
commit | 27f100b1d47058b92d0e23d8c1b2e472fb0eafca (patch) | |
tree | 2f12c1364fe0b5abb9b7f1405be81e04023193dd /components/script/dom/xmlhttprequest.rs | |
parent | c6ff767625fff00e7c8f41d254c074e8e1e277be (diff) | |
download | servo-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.rs | 9 |
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 } |