Description[ServiceWorkerCache] Serialize ServiceWorkerCacheStorage operations
There are correctness issues in the ServiceWorkerCacheStorage when
multiple operations occur on the same key in parallel. The various
steps of the operations can interleave. This CL serializes all storage
operations by placing all operations in a queue and calling the next
operation from the callback of the previous operation.
While this provides correctness, it is sub-optimal. We really only
need to serialize operations that affect the same key. A smarter
scheduler can be created in the future to implement that (see
https://crbug.com/451174).
What this CL does:
* Creates a new ServiceWorkerCacheScheduler class used by both
ServiceWorkerCache and ServiceWorkerCacheStorage
* Refactor ServiceWorkerCache to use the new scheduler
* Make ServiceWorkerCacheStorage run sequentially, using
the scheduler
BUG=450697
Committed: https://crrev.com/d1292e44b91faf5098719af5e75dc04ec05e3a5a
Cr-Commit-Position: refs/heads/master@{#315022}
Patch Set 1 #Patch Set 2 : Add ServiceWorkerCacheScheduler #Patch Set 3 : Nits #
Total comments: 6
Patch Set 4 : Address comments from PS3 #Messages
Total messages: 8 (2 generated)
|