[w3c/ServiceWorker] Introduce Try Clear Registration; Delay activation (#1079)

This is a follow-up change, to [1], which addresses the issues posed in
[2] and the comments afterwards.

This change makes the callers to the Clear Registration algorithm to
check if no client is using the registration and the registration's
associated service workers have no pending extended events before
invoking the algorithm. Unregister, Handle Service Worker Client Unload,
and the microtasks queued by the extension promises' settlement handlers
invoke Try Clear Registration.

Other error handling steps on registrations that have no associated
worker and Handle User Agent Shutdown invoke Clear Registration directly
as they do.

[1] https://github.com/w3c/ServiceWorker/commit/f1a1120ff07120a2e8f311fb61f429c9a74db1ef
[2] https://github.com/w3c/ServiceWorker/issues/916#issuecomment-237272060

Summary of the issues: https://github.com/w3c/ServiceWorker/issues/916#issuecomment-281274267.

Fixes #916.
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/ServiceWorker/pull/1079

-- Commit Summary --

  * Introduce Try Clear Registration; Delay activation

-- File Changes --

    M docs/index.bs (58)
    M docs/v1/index.bs (54)

-- Patch Links --

https://github.com/w3c/ServiceWorker/pull/1079.patch
https://github.com/w3c/ServiceWorker/pull/1079.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/w3c/ServiceWorker/pull/1079

Received on Thursday, 23 February 2017 07:44:04 UTC