• jkarlin's avatar
    [ServiceWorkerCache] Serialize ServiceWorkerCacheStorage operations · d1292e44
    jkarlin authored
    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}
    d1292e44
content_browser.gypi 98.1 KB