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/serviceworkercontainer.rs | |
parent | c6ff767625fff00e7c8f41d254c074e8e1e277be (diff) | |
download | servo-27f100b1d47058b92d0e23d8c1b2e472fb0eafca.tar.gz servo-27f100b1d47058b92d0e23d8c1b2e472fb0eafca.zip |
Introduce GlobalScope::pipeline_id
Diffstat (limited to 'components/script/dom/serviceworkercontainer.rs')
-rw-r--r-- | components/script/dom/serviceworkercontainer.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs index 3d9202accf4..993241445d5 100644 --- a/components/script/dom/serviceworkercontainer.rs +++ b/components/script/dom/serviceworkercontainer.rs @@ -95,11 +95,14 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer { return Err(Error::Type("Scope URL contains forbidden characters".to_owned())); } - let worker_registration = ServiceWorkerRegistration::new(self.global().r().as_global_scope(), + let global = self.global(); + let global = global.r(); + let global_scope = global.as_global_scope(); + let worker_registration = ServiceWorkerRegistration::new(global_scope, script_url, scope.clone(), self); - ScriptThread::set_registration(scope, &*worker_registration, self.global().r().pipeline_id()); + ScriptThread::set_registration(scope, &*worker_registration, global_scope.pipeline_id()); Ok(worker_registration) } } |