Chromium Code Reviews
DescriptionServiceWorker: Carve out methods of ServiceWorkerProviderContext to delegate classes
This is a refactoring CL for ServiceWorkerProviderContext.
ServiceWorkerProviderContext is used for a variety of things:
For a controlled document, it's used for keeping a controller alive until
ServiceWorkerContainer is created. For ServiceWorkerGlobalScope, it's used for
keeping an associated registration and its versions alive until the worker
context is initialized. This mixed use impairs the readability.
This CL carves them out to delegate classes to improve readability. In addition,
this removes a lock to protect service worker versions accessed from both the
main thread and the worker thread (this access pattern can happen only when a
provider context is created for ServiceWorkerGlobalScope). Actually the lock was
not necessary because ownership of the versions are transferred from the main
thread to the worker thread after registration association is done.
BUG=532098
Committed: https://crrev.com/cd2a5a60f93a81f8cec4171f048de2e54250b0f2
Cr-Commit-Position: refs/heads/master@{#352807}
Patch Set 1 : #Patch Set 2 : rebase #Patch Set 3 : add class comment #
Total comments: 8
Patch Set 4 : rebase #Patch Set 5 : add class comments more #
Messages
Total messages: 23 (13 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||