aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/request.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-02 14:29:01 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:44 +0200
commitf38159b7d39acccef464857b101e9c8a6855aa6e (patch)
tree2dedb19401e0f2586a8e0bfa8d29f67ecc7abce5 /components/script/dom/request.rs
parent092504b4e3c10593730e3c625f98863651b9cc91 (diff)
downloadservo-f38159b7d39acccef464857b101e9c8a6855aa6e.tar.gz
servo-f38159b7d39acccef464857b101e9c8a6855aa6e.zip
Introduce GlobalScope::get_url
Diffstat (limited to 'components/script/dom/request.rs')
-rw-r--r--components/script/dom/request.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs
index 1060f4b963b..7d18a3d0ce0 100644
--- a/components/script/dom/request.rs
+++ b/components/script/dom/request.rs
@@ -92,7 +92,7 @@ impl Request {
// Step 4
// TODO: `entry settings object` is not implemented in Servo yet.
- let base_url = global.get_url();
+ let base_url = global.as_global_scope().get_url();
match input {
// Step 5
@@ -130,7 +130,7 @@ impl Request {
// Step 7
// TODO: `entry settings object` is not implemented yet.
- let origin = global.get_url().origin();
+ let origin = base_url.origin();
// Step 8
let mut window = Window::Client;
@@ -450,8 +450,9 @@ impl Request {
fn net_request_from_global(global: GlobalRef,
url: Url,
is_service_worker_global_scope: bool) -> NetTraitsRequest {
- let origin = Origin::Origin(global.get_url().origin());
- let pipeline_id = global.as_global_scope().pipeline_id();
+ let global_scope = global.as_global_scope();
+ let origin = Origin::Origin(global_scope.get_url().origin());
+ let pipeline_id = global_scope.pipeline_id();
NetTraitsRequest::new(url,
Some(origin),
is_service_worker_global_scope,