DescriptionMake ServiceWorker an ActiveDOMObject
Before this patch, the ServiceWorker object returned by
navigator.serviceWorker.register() could be garbage collected
prematurely causing state change event handlers to never be invoked.
This patch makes ServiceWorker an ActiveDOMObject and keeps it alive
until either stop() is called on it (indicating detach of the parent
document) or it reaches the terminal "deactivated" state (soon to be
renamed "redundant").
For future work, it may be possible to be more clever and allow the SW
to die when it has no event handlers.
BUG=383972
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176197
Patch Set 1 #Patch Set 2 : fix hasPendingActivity #
Total comments: 13
Patch Set 3 : review comments #
Total comments: 12
Patch Set 4 : call up to AbstractWorker::hasPendingActivity #Patch Set 5 : revise test #
Total comments: 11
Patch Set 6 : review comments #
Total comments: 2
Patch Set 7 : patch for landing #Messages
Total messages: 13 (0 generated)
|