diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2019-01-03 16:29:22 -0800 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2019-01-04 09:34:04 -0800 |
commit | 6df1c6d7e71794fda5dd7c49c538baa27bdcb1cb (patch) | |
tree | dbe00041e484d7f4cfca6833440c4eeb684b6989 /components/script/dom/serviceworkercontainer.rs | |
parent | e28e73c81fcbed570955f2175d56ee794de6882a (diff) | |
download | servo-6df1c6d7e71794fda5dd7c49c538baa27bdcb1cb.tar.gz servo-6df1c6d7e71794fda5dd7c49c538baa27bdcb1cb.zip |
Explain unrooted_must_root on ServiceWorkerContainer::Register
Diffstat (limited to 'components/script/dom/serviceworkercontainer.rs')
-rw-r--r-- | components/script/dom/serviceworkercontainer.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs index db6cfa896cf..c44d140d88b 100644 --- a/components/script/dom/serviceworkercontainer.rs +++ b/components/script/dom/serviceworkercontainer.rs @@ -51,9 +51,9 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer { self.client.get_controller() } - #[allow(unrooted_must_root)] - // https://w3c.github.io/ServiceWorker/#service-worker-container-register-method and - A - // https://w3c.github.io/ServiceWorker/#start-register-algorithm - B + /// https://w3c.github.io/ServiceWorker/#service-worker-container-register-method and - A + /// https://w3c.github.io/ServiceWorker/#start-register-algorithm - B + #[allow(unrooted_must_root)] // Job is unrooted fn Register(&self, script_url: USVString, options: &RegistrationOptions) -> Rc<Promise> { // A: Step 1 let promise = Promise::new(&*self.global()); @@ -124,6 +124,7 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer { promise.clone(), &*self.client, ); + // Job is unrooted here, do not do anything other than immediately scheduling ScriptThread::schedule_job(job); promise } |