[slightlyoff/ServiceWorker] Don't associate a job with a client, instead just have a referrer. (#889)

The client of a job was used for two purposes:

1) To set as client on the requests for fetching the service worker script.

   This was replaced with setting the referrer of the request, while leaving
   the client null. This is consistent with how regular workers and shared
   workers fetch their source (with the difference that there the client of
   the request is the worker itself, and the referrer is the page/worker that
   created the worker).

   This is still somewhat problematic for module type workers though. The
   algorithm for fetching a module script tree requires a client to store
   for a module map to store the modules on (and also doesn't have a
   separate referrer, which might or might not be intentional). Not sure
   what to do here, but the previous spec was wrong anyway, since it could
   pass a null client and should be passing something representing the
   service worker. This is issue #849.

2) To verify that the client from which a service worker was registered or
   unregistered was same origin with the service worker. For this we now
   just use the origin of the job's referrer.
You can view, comment on, or merge this pull request online at:

  https://github.com/slightlyoff/ServiceWorker/pull/889

-- Commit Summary --

  * Don't associate a job with a client, instead just have a referrer.

-- File Changes --

    M spec/service_worker/index.bs (25)
    M spec/service_worker/index.html (849)
    M spec/service_worker_1/index.bs (20)
    M spec/service_worker_1/index.html (781)

-- Patch Links --

https://github.com/slightlyoff/ServiceWorker/pull/889.patch
https://github.com/slightlyoff/ServiceWorker/pull/889.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/pull/889

Received on Friday, 22 April 2016 23:09:40 UTC