diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-01 18:15:15 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:38 +0200 |
commit | ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8 (patch) | |
tree | d60b33499b7caf460b78d53131bb0f147b6e5be0 /components/script/dom/serviceworkercontainer.rs | |
parent | 27f100b1d47058b92d0e23d8c1b2e472fb0eafca (diff) | |
download | servo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.tar.gz servo-ae6af5172b5f09e9ba19d0beca026fd0ac39f8c8.zip |
Introduce Reflectable::global_scope
Diffstat (limited to 'components/script/dom/serviceworkercontainer.rs')
-rw-r--r-- | components/script/dom/serviceworkercontainer.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs index 993241445d5..12bab94fe12 100644 --- a/components/script/dom/serviceworkercontainer.rs +++ b/components/script/dom/serviceworkercontainer.rs @@ -95,14 +95,12 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer { return Err(Error::Type("Scope URL contains forbidden characters".to_owned())); } - let global = self.global(); - let global = global.r(); - let global_scope = global.as_global_scope(); - let worker_registration = ServiceWorkerRegistration::new(global_scope, + let global = self.global_scope(); + let worker_registration = ServiceWorkerRegistration::new(&global, script_url, scope.clone(), self); - ScriptThread::set_registration(scope, &*worker_registration, global_scope.pipeline_id()); + ScriptThread::set_registration(scope, &*worker_registration, global.pipeline_id()); Ok(worker_registration) } } |