Skip to content

Commit

Permalink
Improve Activate with Try Activate (#1065)
Browse files Browse the repository at this point in the history
This adds concepts and algorithms to track events (all service worker
events: lifecycle events, functional events, extendable message events)
that have pending extension promises so they can be used to check if the
registration's waiting worker can be promoted.

This also changes Install algorithm and related steps to match to the
implementations behavior. That is, instead of waiting for the promotion
condition in Install algorithm, newly introduced Try Activate algorithm
just tries to activate depending on the condition and return. Try
Activate is called when:
 - A service worker is installed.
 - The last client controlled by the existing active worker is unloaded.
 - skipWaiting() is called.
 - The extend lifetime promises for the existing active worker settle.

Related issue: #916.
  • Loading branch information
jungkees authored Feb 16, 2017
1 parent 8d59348 commit f1a1120
Show file tree
Hide file tree
Showing 4 changed files with 918 additions and 537 deletions.
Loading

0 comments on commit f1a1120

Please sign in to comment.