[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 Review URL: https://codereview.chromium.org/867903005 Cr-Commit-Position: refs/heads/master@{#315022}
Showing
This diff is collapsed.
Please register or sign in to comment