Revert "Constrain DOM Storage backend lifetime"
This reverts commit f219c238. Reason for revert: LocalStorageImplTest.CorruptionOnDisk became flaky. Three builds are failing in a row. Example build: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64%20%28dbg%29/18708 Original change's description: > Constrain DOM Storage backend lifetime > > LocalStorageImpl and SessionStorageImpl are self-owned objects with > lifetime loosely bound to their corresponding Mojo interface receivers. > This means it's possible for them to outlive the service itself (i.e. > the StorageServiceImpl instance) and continue scheduling work during > the service process's shutdown. They also use shutdown-blocking > TaskRunners for some of their tasks, which is problematic given the > potentially too-long lifetime: if a non-shutdown-blocking task races > with shutdown completion and then attempts to schedule a shutdown- > blocking task, we have a bad time. > > This CL fixes the issue by changing LocalStorageImpl and > SessionStorageImpl to have stronger ownership within PartitionImpl > and initiating an explicit shutdown step when the partition is > torn down. This step effectively inhibits the scheduling of any > subsequent non-shutdown-blocking tasks for these objects, ensuring > that any remaining work comes in the form of shutdown-blocking tasks > scheduled prior to or during the explicit shutdown step, or from > other shutdown-blocking tasks posted by those tasks. In other words, > shutdown remains continuously blocked until these objects are done > scheduling work. > > This achieves the same shutdown-blocking behavior without the risk > of a race against shutdown completion. > > Fixed: 1135957 > Change-Id: Ie2fcc25df7fafe390c736d2c56d139433c69bf8c > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533934 > Reviewed-by: Victor Costan <pwnall@chromium.org> > Commit-Queue: Ken Rockot <rockot@google.com> > Cr-Commit-Position: refs/heads/master@{#829483} TBR=rockot@google.com,pwnall@chromium.org Change-Id: Ibad7482357ba3122fd88afad31ed4a85b6651c83 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551866Reviewed-by:Makoto Shimazu <shimazu@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#829577}
Showing
This diff is collapsed.
Please register or sign in to comment